JavaFX

  • What Is JavaFX?

    Oracle Endeca Information Discovery OverviewJavaFX is an open source Java-based framework for developing rich client applications. It is comparable to other frameworks on the market such as Adobe Flex and Microsoft Silverlight. JavaFX is also seen as the successor of Swing in the arena of graphical user interface (GUI) development technology in Java platform. The JavaFX library is available as a public Java application programming interface (API). JavaFX contains several features that make it a preferred choice for developing rich client applications:

  • Your First JavaFX Application creation

    JavaFX Application creation manualLet’s write your first JavaFX application. It should display the text “Hello JavaFX” in a window. I will take an incremental, step-by-step approach to explain how to develop this first application. I will add as few lines of code as possible, and then, explain what the code does and why it is needed.

     

    Creating the HelloJavaFX Class

    A JavaFX application is a class that must inherit from the Application class that is in the javafx.application package. You will name your class HelloFXApp and it will be stored in the com.jdojo.intro package. Listing 1 shows the initial code for the HelloFXApp class. Note that the HelloFXApp class will not compile at this point. You will fix it in the next section.