JFrame as Stage.owner?

Werner Lehmann lehmann at media-interactive.de
Thu Jul 12 11:06:24 PDT 2012


Hi,

Stage can have an owner which is important for modality and z-order 
between windows. Is there a way to use a Swing JFrame as owner with 
similar or same semantics?

This is for a Swing app whose parts are to be replaced with new JavaFX 
code, usually with JFXPanel. Now I would like to replace a modeless 
Swing dialog window with its FX counterpart. But how would that Stage be 
always on top of its "owner" - the Swing mainframe / JFrame?

The only alternative I am seeing is to continue using JDialog etc with 
embedded JFXPanels until the whole application (the mainframe!) is 
converted to FX. This will take years and may never happen because there 
is at least one highly specialized 3rd party Swing control which I 
cannot put into a FX Scene node graph.

Werner


More information about the openjfx-dev mailing list