changeset 6721:9f6cbd5a5c62

8021381: JavaFX scene included in Swing JDialog not starting from Web Start Reviewed-by: art, dcherepanov
author leonidr
date Tue, 06 Aug 2013 16:54:35 +0400
parents 04036faa7fc4
children 070b277e1b43 5e2ce096b9e5
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 10:45:49 2013 -0700
+++ b/src/share/classes/sun/awt/AppContext.java	Tue Aug 06 16:54:35 2013 +0400
@@ -309,11 +309,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();
                         }
                     }