-
Enhancement
-
Resolution: Fixed
-
P2
-
fx2.0
Currently, a swing application must call Application.launch, passing in a subclass of Application. This is cumbersome and error prone. In the most recent build, I have factored this out into a dummy class in SwingJavaFXChart as follows:
//NOTE: this method of launching the JavaFX runtime is temporary and will
// be superseded by a method on JFXPanel itself.
public static class TmpFxLauncher extends Application {
@Override public void start(Stage primaryStage) {
}
private static void launch() {
Application.launch(null);
}
}
This can go away as soon as we settle on exactly how we want to launch FX from JFXPanel. Regardless of how we do it, a Swing / FX interop app should not need to refer to the Application class.
I recommend making initialization implicit when the first JFXPanel instance is constructed.
//NOTE: this method of launching the JavaFX runtime is temporary and will
// be superseded by a method on JFXPanel itself.
public static class TmpFxLauncher extends Application {
@Override public void start(Stage primaryStage) {
}
private static void launch() {
Application.launch(null);
}
}
This can go away as soon as we settle on exactly how we want to launch FX from JFXPanel. Regardless of how we do it, a Swing / FX interop app should not need to refer to the Application class.
I recommend making initialization implicit when the first JFXPanel instance is constructed.
- duplicates
-
JDK-8100768 Implementing JavaFX Controls in Swing with Platform.runLater() only
-
- Closed
-