changeset 7773:e76b1568d002

8021381: JavaFX scene included in Swing JDialog not starting from Web Start Reviewed-by: art, dcherepanov
author leonidr
date Fri, 02 Aug 2013 15:42:04 +0400
parents 495ca130cbde
children 07abddc1d7f2
files src/share/classes/sun/awt/AppContext.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/awt/AppContext.java	Thu Aug 01 17:09:59 2013 +0400
+++ b/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();
                         }
                     }