JavaFX Part 1: SceneBuilder
Learning objectives
- Be able to create a JavaFX project.
- Understand the principles of building user interfaces using SceneBuilder.
- Be able to create a form that asks the user for information, stores that information in memory, and displays the entered information in the user interface.
- Be able to create a local Git repository for a project with appropriate settings and make commits to the repository.
So far, we have implemented programs that run in a text-based command-line environment. In this part, we take a step toward more visual applications and become familiar with the JavaFX library, which allows us to build graphical user interfaces.
We will use the SceneBuilder tool for visually designing the user interface. At the same time, we will start using version control (Git), which helps us manage our project's source code and prepares us for the first phase of the course project.
During Parts 7 and 8, we will build a simple Todo application. This section contains exercises in which you will learn how to create the same application independently. These chapters provide the understanding of JavaFX that you will need in order to create your own course project during Parts 9–11.
In Part 7, we will implement the following features:
- The user can add a new task.
- The user can view a list of all tasks.
- The user can mark a task as completed.
- The user can delete a task.
- The user can restore a completed task back to an unfinished state.
- Tasks are saved to a file so that they persist after the application is closed.
- Tasks are loaded from the file when the application starts.
By the end of this part, our application will function as follows:
As before, you must complete at least 50% of the exercises in this part. However, for Parts 7 and 8 we strongly recommend completing all exercises, as this will make developing the course project much easier. The bonus exercises remain completely optional.