View RSS Feed

JavaFX Application

JavaFX Application

  1. Where GUI events happen: the JavaFX Application Thread

    by , 12-11-2016 at 06:20 PM (A JavaFX Blog)
    When a JavaFX application is launched, the JavaFX framework creates a thread (generally referred to as the application thread, or the event thread) that handles the GUI of the application: for example, all GUI-generated events (mouse clicks, key presses, etc.) are processed in this thread, and any event handlers defined by the application programmer are executed in this thread. This is also the thread that manages all the updates to the application GUI, so in order to keep the interface responsive ...

    Updated 12-11-2016 at 06:34 PM by JavaFX

    Categories
    JavaFX Events , JavaFX Application
  2. The Life-Cycle Methods of a JavaFX Application

    by , 12-09-2016 at 06:51 PM (A JavaFX Blog)
    The methods of the javafx.application.Application class that define the life cycle of a JavaFX application are the following:

    • public void init()
    • public abstract void start(Stage primaryStage)
    • public void stop()


    The init() method is called right after an Application object is instantiated, and can be used for application-specific initializations; however, GUI operations such as creating stages or scenes cannot be done from within this method, because at the time ...

    Updated 12-11-2016 at 06:16 PM by JavaFX

    Categories
    JavaFX Application
  3. How to Launch a JavaFX Application

    by , 12-09-2016 at 06:13 PM (A JavaFX Blog)
    The javafx.application.Application class, which defines a JavaFX application, can be launched by calling one of its two static launch() methods:

    • public static void launch(String... args)
    • public static void launch(Class<? extends Application> appClass, String... args)


    The first method takes as argument a set of application parameters, while the second method takes an additional argument indicating an Application subclass. The difference between the two methods ...

    Updated 12-11-2016 at 05:34 PM by JavaFX

    Categories
    JavaFX Application