Developing a custom UI
For the final part of this chapter, we are going to develop a custom UI component based on JavaFX 8 built-in controls.
We will develop this custom UI with concepts discussed before that are based on FXML; the primary advantage is the separation of concerns to customize the component later on without altering its functionality and any other logic bound to it.
The Login dialog custom UI
We will use most of the previously covered tools and techniques to develop our custom UI: the Login Dialog, which is a necessary component in every Enterprise application. Our UI component will be as shown in the following screenshot:
Structure of the Login dialog custom UI
The most common structure and stages in custom component development based on FXML markup are these:
- Develop the UI inside the Scene Builder tool; then export the result to the FXML-based file
- Extract the controller skeleton from the Scene builder
- Create a controller that binds the UI (view) to its...