Cannot see JFXPanels on modal JDialog

Artem Ananiev artem.ananiev at
Fri Aug 10 08:32:30 PDT 2012

On 8/10/2012 1:37 PM, Werner Lehmann wrote:
> Solved, another case of PEBCAK. I was showing the JDialog directly from
> the FX application thread. SwingUtilities.invokeLater helped. Of course,
> it would have been nice to be able to use a FX window in the first
> place... but that does not take a JFrame as owner.

I wonder why it was not reproducible with a simple test case then...



> FWIW, here's the application thread stack trace waiting on the AWT
> treelock.
>> "JavaFX Application Thread" prio=6 tid=0x0000000008dad000 nid=0x1a08
>> in Object.wait() [0x000000000cd0c000]
>> java.lang.Thread.State: WAITING (on object monitor)
>> at java.lang.Object.wait(Native Method)
>> - waiting on <0x00000000f033ba28> (a java.awt.Component$AWTTreeLock)
>> at java.lang.Object.wait(
>> at Source)
>> - locked <0x00000000f033ba28> (a java.awt.Component$AWTTreeLock)
>> at Source)
>> at java.awt.Component.setVisible(Unknown Source)
> Werner
> On 10.08.2012 01:08, Werner Lehmann wrote:
>> Hi,
>> here is a strange problem with a JFXPanel, hopefully somebody has an
>> idea...
>> I have a JDialog with a JTree and two JFXPanels. Everything works fine
>> if the dialog operates modeless. As soon as I make it modal, the fx
>> panels are missing. It does not matter which type of modality I use.
>> Already tried to reproduce it with a test application but that did work.
>> Then I tried to add a sleep to give the fx panels some time to
>> initialize (which is of course in Platform.runLater). No cigar. Being
>> stumped now.
>> works: new JDialog(someframe, false)
>> does not work: new JDialog(someframe, true)

More information about the openjfx-dev mailing list