Skip to content

IntelliJ Introduction To JavaFX

Amir Sagiv edited this page Jul 1, 2017 · 1 revision

JavaFX

JavaFX is a set of graphics and media packages that enables developers to design, create, test, debug, and deploy rich client applications that operate consistently across diverse platforms.

Installing JavaFX

If you're using JDK8 (As you should) then You already have JavaFX and it is ready to be used.

Writing a JavaFX application

There are 2 approaches you can write JavaFX application, The first one is to write the code from zero with no external tools through the IntelliJ just by creating and writing a .fxml file inside IntelliJ. The second approach is to use the SceneBuilder tool that you can download free from Oracle website. This tool will give you a comfortable and rich interface to work with and design your software in the most convenient way!

Connecting IntelliJ with the SceneBuilder

First you will need to open a .fxml file in your project: image

Now, Download and install SceneBuilder in it's default path. a link for the download is at the end of this article. once your'e done with the installation, right click on the .fxml file you just created and then:

image

The SceneBuilder window will be opended and you can start designing your UI. Saving your work in SceneBuilder will automatically save the changes inside IntelliJ too. To write the back end you will need to create a Java class connecting with the fxml file. Tutorial links are also at the end.

Links

SceneBuilder Download

Tutorial

Oracle's tutorial

YouTube tutorials

Special thanks to Sharon Kuninin Levenzon for his recommendation and explanation

Clone this wiki locally