O'Reilly logo

NetBeans IDE 8 Cookbook by Rhawi Dantas, David Salter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and using a JavaFX custom control

Like any good component-based framework, JavaFX allows developers to create custom components that can be used within the developer tools just like any of the built-in components.

In this recipe, we'll see how to create a custom JavaFX component and then see how it can be used from within Java code and also from within FXML. The custom component will be a text string and an input box that can be repeatedly used for asking for a single piece of information. The custom component will look like the following screenshot:

Creating and using a JavaFX custom control

Getting ready

To complete this recipe, you'll need to have either the Java SE, or the Java ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required