8021381: JavaFX scene included in Swing JDialog not starting from Web Start
authorleonidr
Fri, 02 Aug 2013 15:42:04 +0400
changeset 19174 175494bb464e
parent 19173 5c179adfb12b
child 19175 478a81cf568d
8021381: JavaFX scene included in Swing JDialog not starting from Web Start Reviewed-by: art, dcherepanov
jdk/src/share/classes/sun/awt/AppContext.java
--- a/jdk/src/share/classes/sun/awt/AppContext.java	Thu Aug 01 17:09:59 2013 +0400
+++ b/jdk/src/share/classes/sun/awt/AppContext.java	Fri Aug 02 15:42:04 2013 +0400
@@ -310,11 +310,13 @@
                     // and excludes applets because by the time applet starts
                     // a number of contexts have already been created by the plugin.
                     if (numAppContexts.get() == 0) {
-                        // This check is not necessary, its purpose is to help
-                        // Plugin devs to catch all the cases of main AC creation.
                         if (System.getProperty("javaplugin.version") == null &&
                                 System.getProperty("javawebstart.version") == null) {
                             initMainAppContext();
+                        } else if (System.getProperty("javafx.version") != null &&
+                                threadGroup.getParent() != null) {
+                            // Swing inside JavaFX case
+                            SunToolkit.createNewAppContext();
                         }
                     }