Scott Palmer swpalmer at gmail.com
Thu Jan 3 08:58:17 PST 2013

Yes.. I have to look again at JFXtras, to see what they already offer, but I see a need for something like a JavaFX version of JOptionPane.  That way you get those default OK/Cancel buttons, the dialog result, etc.
So far I'm implementing tiny bits on demand, but I need to revisit the whole problem and refactor the code.  Dealing with Swing and JavaFX simultaneously can get messy which is why I'm trying got migrate my entire application as soon as practical.  There still isn't a 1:1 match in JavaFX for things we are using in Swing, and JavaFX is young enough that there are still many rough edges.


On 2013-01-03, at 5:28 AM, Werner Lehmann <lehmann at media-interactive.de> wrote:

> Hi Scott,
> makes sense. I have to keep that in mind for next time. I guess there also has to be some code for common dialog tasks, e.g.
> - show dialog centered on app or on parent window
> - modal or modeless
> - standard handling of ok/cancel/etc buttons (e.g. know when to close the dialog)
> - data validation before close
> - pass a dialog result to the caller
> This is not rocket science but I very much would like to see some standard API for that. Maybe it even makes sense to have skeleton JDialog/Stage classes which bring their own set of buttons. Otherwise you have this ok button in the JFXPanel node but the JDialog does not know when it was clicked.
> Werner
> On 02.01.2013 20:06, Scott Palmer wrote:
>> I intend to pursue this by creating some helper methods to show a
>> dialog containing a single Parent node.  Depending on the parent
>> object for the dialog it would automatically wrap the node in a
>> JFXPanel and use a JDialog, or use a Stage.  That way I keep the ugly
>> stuff in one place and don't have to revisit all those dialogs.

More information about the openjfx-dev mailing list