src/share/classes/sun/awt/AppContext.java
Print this page
*** 307,321 ****
// Special case: we implicitly create the main app context
// if no contexts have been created yet. This covers standalone apps
// 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();
}
}
AppContext context = threadGroup2appContext.get(threadGroup);
while (context == null) {
--- 307,323 ----
// Special case: we implicitly create the main app context
// if no contexts have been created yet. This covers standalone apps
// and excludes applets because by the time applet starts
// a number of contexts have already been created by the plugin.
if (numAppContexts.get() == 0) {
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();
}
}
AppContext context = threadGroup2appContext.get(threadGroup);
while (context == null) {