JavaFX Hello World

There is nothing easier to start on the javafx tutorial than to start with Hello World application. First and foremost you have to download netbeans with javaFX. Just follow the instructions in installation. After you have the IDE, you can start creating your first JAVAFX application.

JAVAFX Getting Started

  1. Open Netbeans
  2. Go to File –> New Project
  3. On the Categories List, Select JavaFX and then on the Projects select the JavaFX Application.

    new javafx project

    new javafx project

  4. Click Next
  5. Now you have to name your Project. Put simply HelloWorld as Project Name and Click Finish.

    hello world project config

    hello world project config

  6. A new java code will automatically be generated and you would find it in HelloWorld –> Source Packages –>heeloworld –> HelloWorld. The code would be similar to this.


  7. Run the program and you would get the following console output:
  8. As you would have noticed, a new application will run that will look similar like this.

    hello word application

    hello word application

  9. Pressing the button Say ‘Hello World’ will give a console output of Hello World! as presented in item 7.

Congratulations you now have your first JavaFX Application.

Comments are closed