Back in 2012 I wrote a very detailed JavaFX 2 tutorial series for my students. Many people all over the world have been reading the tutorial and gave very positive feedback. So I decided to rewrite the JavaFX 2 tutorial for JavaFX 8 (read about what changed in Update to JavaFX 8 - What's New).
This tutorial walks you through designing, programming and deploying an address application. This is how the final application will look like:
What you will learn
- Creating and starting a JavaFX project
- Using Scene Builder to design the user interface
- Structuring an application with the Model-View-Controller (MVC) pattern
ObservableListsfor automatically updating the user interface
TableViewand reacting to selection changes in the table
- Create a custom popup dialog to edit persons
- Validating user input
- Styling a JavaFX application with CSS
- Persisting data as XML
- Saving the last opened file path in user preferences
- Creating a JavaFX chart for statistics
- Deploying a JavaFX application as a native package
This is quite a lot! So, after you you've completed this tutorial series you should be ready to build sophisticated applications with JavaFX.
How to use this Tutorial
There are two ways to use this tutorial:
- learn-a-lot track: Create your own JavaFX project from the ground up.
- fast track: Import the source code for a tutorial part into your IDE (it's an Eclipse project, but you could use other IDEs like NetBeans with slight modifications). Then go through the tutorial to understand the code.
Now, I hope you'll have fun! Start with Part 1: Scene Builder.