Skip to main content

Application Lifecycle, Application Class, Stage and Scene Graph

Learn Application Lifecycle, Application Class, Stage and Scene Graph (Phase 1 · JavaFX Fundamentals (Core), JavaFX) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The Application lifecycle • Application.launch(args) starts the toolkit and calls, in order: init() (on the launcher thread , no UI creation , a good place for loading configuration), start(Stage primaryStage) (on the JavaFX Application Thread : build and show the UI) and, after the last window closes (when Platform.isImplicitExit() ) or Platform.exit() , stop() (release resources, close pools and DB connections). launch blocks until the application exits and can be called only once per JVM. getParameters() gives command-line arguments.

More lessons in Phase 1 · JavaFX Fundamentals (Core)