JFXPanel

Scott Palmer swpalmer at gmail.com
Thu Dec 20 19:00:02 PST 2012


On 2012-12-17, at 5:55 AM, Artem Ananiev <artem.ananiev at oracle.com> wrote:

> 
> On 12/14/2012 8:19 PM, Werner Lehmann wrote:
>> Scott,
>> 
>> JFXPanel has quite a few issues (look for JFXPanel or Swing in Jira).
>> Among those is the filechooser problem. It is probably just one instance
>> of the problem that a JavaFX stage cannot be modal or on top of Swing
>> windows.
> 
> Yes, z-order and modality problems with Swing and FX top-level windows is a known issue. Unfortunately, I don't know a good way to fix it: AWT/Swing doesn't expose enough information to use its windows as owner windows for other UI toolkits.
> 
> Thanks,
> 
> Artem


I responded earlier wondering why the native window handle of the Swing Window wasn't acquired via the publicly available jawt native methods so it could be used as the parent for a Stage or worked into some sort of hierarchy to give a proper parent window to FX Stages and dialogs.   I didn't see any response.  Am I missing something?

I already do this (get and use the native window handle) in a Swing app so that I can blit live video into my Swing app., a high-end video capture/transcoder/broadcast application. (See http://www.digitalrapids.com/en/Products/StreamZHD.aspx or the one that really could have used FX if it was ready earlier http://www.digitalrapids.com/en/Products/TouchStream.aspx)

I actually have a need to do the same with a JavaFX app .. but there is no equivalent in FX land for the jawt JNI methods. (I asked for this years ago in the Java FX 1.0 days.)

Is all of the code involved in JFXPanel->Scene->Window Open Source?  I went poking around but didn't find the implementation of com.sun.javafx.tk.quantum.QuantumToolkit which I think is used to create the peer of the EmbeddedWindow used as the Window for JFXPanels.

Cheers,

Scott


More information about the openjfx-dev mailing list