http://edu.makery.ch/blog/2012/10/30/javafx-2-dialogs/
————————————————————————————————————————————
When programming a graphical user interface (GUI) there are occasions where you’ll need a simple popup dialog to communicate with the user. In Swing (the predecessor of JavaFX) there is a convenient class called JOptionPane for such dialogs. A similar class doesn’t exist in JavaFX 2.x (yet).
Fortunately, the authors of JavaFX published some user interface controls they are currently working on. Those controls might be added in a future version of JavaFX.
One of those ui controls is a class called Dialogs.java
which is exactly what we need.
How To Use the Dialogs
- Download the newest javafx-dialogs-x.x.x.jar file from my GitHub Page. I put all necessary classes, css files and images inside this jar.
- Add the jar file to your project (usually inside a lib subfolder).
- Add the jar file to the project’s classpath: In Eclipse right-click on the jar file | Build Path | Add to Build Path. Now Eclipse knows about the library.
- Then add one of the following lines: