From a7ee7996cfeba0f5d3bda1990e8d4e5436ba48b6 Mon Sep 17 00:00:00 2001 From: Leonid Romanov Date: Fri, 2 Aug 2013 15:42:04 +0400 Subject: [PATCH] 8021381: JavaFX scene included in Swing JDialog not starting from Web Start Reviewed-by: art, dcherepanov --- jdk/src/share/classes/sun/awt/AppContext.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/sun/awt/AppContext.java b/jdk/src/share/classes/sun/awt/AppContext.java index 4af13ce5703..d4ed6525ad8 100644 --- a/jdk/src/share/classes/sun/awt/AppContext.java +++ b/jdk/src/share/classes/sun/awt/AppContext.java @@ -310,11 +310,13 @@ public final class AppContext { // 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(); } }