Skip Top Navigation Bar

JavaFX Fundamentals

This page was contributed by Gail C. Anderson and Paul Anderson under the UPL and is from The Definitive Guide to Modern Java Clients with JavaFX 17 graciously contributed by Apress.

With the Java SDK and JavaFX installed on your system, let’s create some applications and explore the fundamentals of JavaFX. First, we’ll describe the basic structure of a JavaFX application along with selected features that make JavaFX a powerful choice for modern clients. We’ll show you how to create UIs that are appealing and responsive. We’ll look at FXML, the XML-based markup language that lets you define and configure your UI. We’ll also introduce Scene Builder, a stand-alone drag-and-drop utility for designing and configuring a JavaFX UI.

To further refine or completely restyle your UI, JavaFX uses Cascading Style Sheets (CSS). We’ll show you several ways to use CSS with JavaFX.

JavaFX properties provide a powerful binding mechanism. We’ll introduce JavaFX properties and binding. We’ll show why JavaFX observables and binding help create compact code that is less error prone than bulky listeners. We’ll also explore several layout controls and show you how easy it is to incorporate animation into your UI.

We’ll finish the series with a sample application that implements a master-detail UI using JavaFX collections, an editable form, and buttons for typical database CRUD operations. This, then, is meant to give you a taste of what is possible with JavaFX and to provide the basics for exploring JavaFX even further throughout this book. Let’s begin!


  1. JavaFX Application Basic Structure By Example

    Explore JavaFX application components and build a simple application.

  2. JavaFX Layout Controls

    Let's take a tour of some common JavaFX layout controls.

  3. Effects, Gradients and Animations

    Learn how to apply effects, gradients, animations to nodes in your scene graph.

  4. JavaFX Properties

    Control nodes by manipulating their properties.

  5. Using FXML

    Use FXML to describe and configure your scene graph in a declarative format.

  6. Putting all together

    Build an example application with JavaFX.



Back to Tutorial List