Java Tutorial 83 - Getting Started with JavaFX

preview_player
Показать описание
In this tutorial, I will show you how to get started with JavaFX using Scene Builder. JavaFX allows you to create Java applications with graphic user inteface (GUI). Support for JavaFX on Java SE 8 will continue until March 2025.

1. Download Java SE Development Kit 8

The default installation location is "C:\Program Files\Java\jdk1.8.0_251\".

3. Install Scene Builder on Windows 10

If you install JavaFX Scene Builder on a 64-bit Windows machine, the default installation location is C:\Users\your_username\AppData\Local\SceneBuilder.

4. Configure the JavaFX Scene Builder to with NetBeans IDE 11.3

Netbeans IDE Installation directory.

C:\Program Files\NetBeans-11.3

From the Main menu, select Tools and choose Options.
In the Options window, click Java and then the JavaFX tab.
Specify the location of the Scene Builder installation folder and then click OK.
in this example, C:\Users\your_username\AppData\Local\SceneBuilder.

5. Use NetBeans IDE to create a JavaFX Project, and run the JavaFX Scene Builder to design UI.

In NetBeans IDE, you use the New Project wizard to create a new JavaFX FXML Application, which is a JavaFX project that is based on an FXML layout. After the project is created, you can edit the FXML file using Scene Builder.

Use the Make Controller command if you delete an element in the Control panel or update an fx:id value or a method name in JavaFX Scene Builder so that the controller source code can be synchronized.

7. Run and test your JavaFX application

Click on the green Run button to launch the JavaFX application.

Рекомендации по теме
visit shbcf.ru