Good day!
I am developing a program using JavaFX SDK. I wanted to have a message box like in C#:
DialogResult rs = MessageBox.showDialog("Message Here...");
if (rs == ....) {
// code
}
I want to have a functionality like this using JavaFX SDK. Answers are very much appreciated.
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Alert.html
So the code looks something like
This is what I ended up using, which is part of the JavaFX UI Controls Sandbox as announced here on FX Experience :
This is a nice and easy to use dialog. Can't compare with others as this is the only one I have used. No issues with it.
The code is very concise. Looks like this :
MessageBox on JavaFX 2.2 by OSS is here
I think it will help you.
At the moment I use this library for showing Dialogs. Maybe it can be of use for you:
https://github.com/4ntoine/JavaFxDialog
Use the namespace:
Calling from main thread:
Calling from not main thread:
Here is another simple alternative: https://sites.google.com/site/martinbaeumer/programming/open-source/fxmessagebox
Surprising that there is still no standard message box available in JavaFX 2.2