Book Image

Mastering Netbeans

5 (1)
Book Image

Mastering Netbeans

5 (1)

Overview of this book

Table of Contents (17 chapters)
Mastering NetBeans
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

JavaFX applications


JavaFX is the Java Platform's newest lightweight toolkit for developing rich client applications and is described by Oracle as "the next step in the evolution of Java as a rich client platform". JavaFX is intended to be the long-term replacement for Swing. It was first announced in 2007 with version 1.0 being released shortly afterwards. With the release of Java 7 Update 6, JavaFX was supplied as standard with the Java JDK, whereas previously, it was a separate download. Since the release of Java 8, JavaFX has used the same numbering system as that of Java itself; hence, the latest version of JavaFX is version 8.

JavaFX allows developers to separate their user interface from their Java code in a simple manner using FXML markup (essentially XML files) for defining user interfaces that can then be styled using CSS.

To get an idea of the differences between Swing and JavaFX, consider the following two code snippets to create a button.

In JavaFX, user interfaces are typically...