CS 3443 - JavaFX



JavaFX comes with the JDK 1.8+, however SceneBuilder and Eclipse plugins are needed to set up your workspace.

Note: on the CS VDI, you need only install the JavaFX plugin for Eclipse.

  1. Install Eclipse
  2. Install the Eclipse JavaFX plugin
  3. Install SceneBuider

Note to Linux users: If you have followed these instructions, restarted your computer, and found that Eclipse does not recognize JavaFX import statements in a project, install OpenJFX using the following command: sudo apt-get install openjfx

Hello, World!

To test out your installation of JavaFX and SceneBuilder, do a "Hello, World" exercise:

  1. Create a new JavaFX Project: File - New - Other - JavaFX Project
  2. Run this as a Java application
Completing this test generates the basic code for "hello, world", and running it displays a small white window.
If this basic example program does not work for you, ensure you have followed the necessary steps for installation.

If that is working, let's make this example a little more interesting by adding GUI components. Import this example project (HelloJavaFX) into Eclipse (File - Import - Existing Project into Workspace).