Book Image

JavaFX Essentials

By : Mohamed Taman, Mohamed Taman
Book Image

JavaFX Essentials

By: Mohamed Taman, Mohamed Taman

Overview of this book

Table of Contents (16 chapters)
JavaFX Essentials
About the Author
About the Reviewers
Monitoring and Controlling Arduino with JavaFX

Resources and references

In this section, you will find many useful links and references that will help you gain further knowledge about all JavaFX topics.

Official documentation

JavaFX samples

One of the greatest resources to start learning JavaFX 8 is the Java Development Kit 8 samples and demos, which include a JavaFX demo folder that contains many fantastic and advanced applications that cover all JavaFX topics with source code that you can experiment with yourself.

You can download the samples, by just visiting the following link, and then go to the Java SE Development Kit 8u45 Demos and Samples Downloads table, check the Accept License Agreement radio button, and click on the zip file link relevant to your operating system, as shown in the following figure:

Download JDK & JavaFX 8 demos and samples

The samples zip file contains pre-built samples that you can run, plus the NetBeans project files for each sample.

Extracting the zip file produces the following directory structure:

--src  (Contains a NetBeans project for each sample)
  <sample1>.jar(Runs the sample as a standalone application)

JavaFX samples folder contents

Any sample.jar can run as a standalone application; double-click on the JAR file and we have four applications:

  1. Ensemble8.jar: A gallery of sample applications that demonstrate a large variety of JavaFX features, including animation, charts, and controls. For each sample, you can do the following on all platforms:

    • View and interact with the running sample

    • Read its description.

    You can do the following for each sample on desktop platforms only:

    • Copy its source code

    • For several samples, you can adjust the properties of the sample components

    • If you are connected to the Internet, you can also follow links to the relevant API documentation Ensemble8 also runs with JavaFX for ARM (means running on Raspberry Pi).

    The Ensemble8 application running

  2. MandelbrotSet.jar: A sample application that demonstrates the advantages of parallel execution done using the Java Parallel API.

    The application renders an image using the Mandelbrot set algorithm and provides intuitive navigation within the range of input parameters.

    More information is available in the index.html file inside the MandelbrotSet folder.

    The MandelbrotSet application running

  3. Modena.jar: A sample application that demonstrates the look and feel of UI components using the Modena theme. It gives you the option to contrast the Modena and Caspian themes and explore various aspects of these themes.

    The Modena application running

  4. 3DViewer.jar: 3DViewer is a sample application that allows the user to navigate and examine a 3D scene with a mouse or a track pad. 3DViewer has importers for a subset of the features in OBJ and Maya files.

    The ability to import animation is also provided for Maya files. (Note that, in the case of Maya files, the construction history should be deleted on all the objects when saving as a Maya file.) 3DViewer also has the ability to export the contents of the scene as Java or FXML files.

    The 3DViewer application running

    In order to play with the code yourself and to experiment with any changes you may have, congratulations, you have this chance to do this by running all the previously mentioned applications from NetBeans as follows:

  5. In the NetBeans IDE, click on Open Project in the toolbar, or on the File menu and select Open Project.

  6. Navigate to the location in which you unzipped the samples, and in the src directory, select a project and then click on Open.

  7. To run the application in the NetBeans IDE, in the Project pane, right-click on the project and choose Run.

Java SE 8

As a reminder, JavaFX 8 is built into the Java 8 SDK. This means that you only need to download the Java 8 SDK. The Java 8 software development kit and related information can be downloaded from the following locations:

The Java SE 8 API documentation and tutorials

The Java 8 documentation and guides are at the following links:

Project Lambda

The core Java SE 8 added language features are lambda expressions and the stream API. The following references are road maps, blogs, and videos of topics surrounding project lambda:


Java SE 8 includes a new scripting engine called Nashorn, which is a new and improved JavaScript engine for the Java runtime. The engine enables developers to use the JavaScript language to program applications.

The following links and references are articles and blogs describing Nashorn:

JavaFX properties and bindings

Properties and bindings are essential to JavaFX when synchronizing values between JavaFX nodes.

The following are great resources about read-only properties, listeners, and the role of JavaFX Beans:

JavaFX communities

So you want to get involved with the JavaFX community? Please check out the following links:

Java SE / JavaFX books and magazines

The following links are newer book titles that relate to the new Java SE 8 and JavaFX 8 platform:

I appreciate your time, and I hope you enjoyed reading this book as much as I enjoyed writing it for you. Thank you.