[API Review] RT-27887: introduce a node to embed Swing into JavaFX

Anthony Petrov anthony.petrov at oracle.com
Fri Jan 25 07:31:25 PST 2013


On 1/25/2013 19:18, Scott Palmer wrote:
> On 2013-01-25, at 10:12 AM, Anthony Petrov <anthony.petrov at oracle.com> wrote:
> 
>> On 1/25/2013 18:56, Scott Palmer wrote:
>>> On 2013-01-25, at 5:48 AM, Anthony Petrov <anthony.petrov at oracle.com> wrote:
>>>> On 1/25/2013 14:28, Mario Torre wrote:
>>>>
>>>>> Also, the API suggest no heavyweight component, does it means menues and
>>>>> tooltip can't be used?
>>>> Menus and tooltips are separate top-level windows, they are not part of the hierarchy of components that are showing the tooltip or the menu. So there should not be any problems with heavyweight popups wrt. the API.
>>> What will such heavyweight popups use as a parent window?  Will we be plagued with the problem of them not respecting the window hierarchy as popups in a JFXPanel have in the past?
>> Popups have a very nice peculiarity that masks the problem: they hide whenever you click somewhere else. So you can't actually notice the z-order issue even if they don't have a proper owner window set. E.g. this is how this currently works for JFXPanel (at least in FX 8).
>>
>> Having said that, we're well aware of the problem with owner windows (for both JFXPanel and the SwingNode), and we have some ideas on how to make it work. No concrete plan yet, though.
> 
> What will happen when I open a JOptionPane that uses this JComponent as it's "parentComponent".  This will happen often.  E.g. the JButton used to trigger the dialog is often used as the parentCompoent of the JOptionPane.  If that JButton is ultimately contained in the JavaFX Scene via one of these Swing Nodes I smell a problem.

I haven't seen the code yet, but I suspect that initially this use-case 
will have issues. I.e. I think that the behavior will be similar to what 
you experience if you open an FX dialog using the JFXPanel's stage as an 
owner.

--
best regards,
Anthony


More information about the openjfx-dev mailing list