Tuesday, June 5, 2012

JavaFX 2: Create a new Dialog on the same Stage

In this tutorial I am going to modify a little bit previous tutorial about How to create a new Dialog with Stage. Instead of opening a new dialog on the new Stage, here we'll open a dialog on the same Stage. That might be useful, in some cases.
Check this video below to see how our example will look in the end.

Here is the code:

Only modification from previous tutorial about JavaFX 2: Create Dialog with Stage is shown below:

As you can see, I've just created a new Scene and added it to primaryStage.


Post a Comment