HIDE NAV

Creating a New JavaFX-11 Project in Intellij IDEA


Basic Framework


1. Create a new Java project, NOT JavaFX, using BellSoft Java 11 Full as your JDK.
 Also, do not use a template. For this example I will name the project MyApp.

2. Once you are in the editor, create a package and class which will contain main().In the navigation pane, select the folder src and right clickNewJava Class.
 For this example the package will be named ceccs and the main class will be named MyApp


3. Your new class should extend Application.
 Add a main() method. Also, remember to add the import for javafx.application.Application.

5. Implent the method start(Stage primaryStage) from codeImplement or codeOverride or from their respective hotkeys ctrl+i or ctrl+o.

6. For JavaFX programs, main() only needs to contain a single line:
  launch(args);
 Also, the window for the Java FX app will now display until primaryStage.show() is called within start()

7. You are now ready to run the program, but you will notice the green run arrow is grayed out.
 To run the application go to Run... and select MyApp (or whatever your main class is called).