Tag Archives: openjfx

JavaFX dialogs

JavaFX dialogs

The JavaFX project doesn’t have dialog controls, so when I wanted to add dialogs to my project I used the dialog controls from the fxexperience project, they release you from all the trouble of creating your own control, but recently they announced that the dialog controls will be in a separate project (announcing-controlsfx-8-20-7) deprecating the current controls.

The new project is called openjfx dialogs and it is located right here https://bitbucket.org/controlsfx/openjfx-dialogs. Since right now it doesn’t contain any documentation I will explain you how to start using it and ease the way to start adopting them.

To start working first download the project repository from here bitbucket.org/controlsfx/openjfx-dialogs, in the left side there is a link to download, it downloads a zip file, unzip it wherever you wan to.

Next the project needs to be build, to do this we will need gradle, for thoose who don’t know what is gradle here it is a brief description about it:

Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build

I’m not going to explain deeper gradle since it is another topic and this post wouldn’t be enough to explain it.

You can download and install gradle form here www.gradle.org, the project already contains a version of gradle you can just run the gradlew.bat file. Either you install it or use the version of the project, run the following command at the root of the project:

gradle build

If the project is built correctly you will find the folders build/lib under the root of the project, under these folders the openjfx-dialogs-X.X.X.jar is located we will need this jar to add the dialog controls.

Now let’s create an example to test the dialogs an see how they work, I’m going to use Netbeans to develop this example.

Let’s create a javafx application project: