Ogly

Getting to know JavaFX (2/3)

Originally posted on December 5, 2012
Updated on January 12, 2015

Introduction

This was the second of two examples I used to teach my first JavaFX workshop. This example covers:

  • properties and binding.
  • MVC with FXML and Scene Builder.
  • CSS.

fx:root

When updating this example for JDK 8, I decided to rework it and use the fx:root construct described here. I very much prefer this approach as it hides the implementation of a component and allows you to easily mix and match handcoded components with ones loaded from FXML. For a different approach, see BugList.

Download

The source code is available on GitHub.