Setting up the user interface

If we wanted to, we could now run our application. It would be very boring, but it would run. Let's try to fix the boring part.

The default FXML created is just an AnchorPane with two children, a Button and a Label. We don't need any of those, so let's get rid of them. Our main user interface will be pretty simple--basically, just a vertical stack of components--so we can use a VBox as our root component. Perhaps, the easiest way to change the root component from the AnchorPane that's there to a VBox is to use Scene Builder to wrap that component in a VBox, and then delete the AnchorPane:

To do that, open the ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.