Steps JavaFX
1. Create project – Java, Gradle, Groovy
2. Create domain package | be.howest.ti.shop.domain
3. Add classes into the package for ex. Product, Inventory, …
4. Write functions into the classes …
5. Create a StartUp class outside the domain package to test code
6. Start on the JavaFX
a. Inside build.gradle: https://openjfx.io/openjfx-docs/#gradle
b.
c.
d.
7. Extend the class StartUp with Application (JavaFX)
a. “public class StartUp extends Application”\
b. Instead of “.run”, use launch(args)
8. Implement start (where you implement the scene)
9. Make scene in SceneBuilder
a. Give the buttons and others ID
10. Save the fxml file into the project – resources – fxml –
11. Into the start scene – StartUp:
a. Parent root = FXMLLoader.load(getClass().getResource(“/fxml/Shop.fxml”));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
12. Make package – services
a. All logical which has nothing to do with the GUI has to go in here
13. Make a ShopService
a. Manages everything, all logic regarding the Shop except the GUI
14. Go to scenebuilder
a. View – generate controller skeleton
15. New package – ui.gui – insert the controller skeleton text (event handling)
16. Inside txml link the controller – “be.howest.ti.shop.ui.gui.ShopController”
1. Create project – Java, Gradle, Groovy
2. Create domain package | be.howest.ti.shop.domain
3. Add classes into the package for ex. Product, Inventory, …
4. Write functions into the classes …
5. Create a StartUp class outside the domain package to test code
6. Start on the JavaFX
a. Inside build.gradle: https://openjfx.io/openjfx-docs/#gradle
b.
c.
d.
7. Extend the class StartUp with Application (JavaFX)
a. “public class StartUp extends Application”\
b. Instead of “.run”, use launch(args)
8. Implement start (where you implement the scene)
9. Make scene in SceneBuilder
a. Give the buttons and others ID
10. Save the fxml file into the project – resources – fxml –
11. Into the start scene – StartUp:
a. Parent root = FXMLLoader.load(getClass().getResource(“/fxml/Shop.fxml”));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
12. Make package – services
a. All logical which has nothing to do with the GUI has to go in here
13. Make a ShopService
a. Manages everything, all logic regarding the Shop except the GUI
14. Go to scenebuilder
a. View – generate controller skeleton
15. New package – ui.gui – insert the controller skeleton text (event handling)
16. Inside txml link the controller – “be.howest.ti.shop.ui.gui.ShopController”