An example of an MVC component with JavaFX.
There's a writeup about this article here.
The program is an example of creating reusable MVC components with JavaFX.
The model is a simple POJO that uses a JavaBeans Property:
There will be 2 such models instantiated at run time. They will exist as separate tabs in a TabPane
:
- bin/ contains an executable JAR of the program
- docs/ contains all of the diagrams and images. The UML was created with UMLet and the diagrams were created with Balsamiq
- nbproject/ contains NetBeans project files (minus the private directory). This project is best used in NetBeans though it is not necessary.
- MainCLI.java A class to run a system I/O loop.
- MediumExample.java This is the Main class.
- SlotMachine.java The model.
- SlotMachineTab.fxml The view template.
- SlotMachineTabController The controller for the view template
- slotmachinetab.css Any styles for the template would go here.
I write ~weekly tutorials covering explorations in computer science and web development. If you find the articles useful, I'll happily accept any donations.
A few other tutorials/projects I've written about: