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

Anton V. Tarasov anton.tarasov at oracle.com
Sun Jan 27 23:37:25 PST 2013


On 25.01.2013 19:31, Anthony Petrov wrote:
> 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).

Clicking on the stage title doesn't close the popup, unless the event is specially handled (which is 
not yet implemented). So, at least there's an issue with torn-off popups when moving a stage with 
its title. (I think it's solvable).

>>>
>>> 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.

Right, the current behavior is similar to JFXPanel when it comes to modality.

Thanks,
Anton.

>
> -- 
> best regards,
> Anthony



More information about the openjfx-dev mailing list