Mixing JavaFX with Swing in different windows

Josh Marinacci joshua at marinacci.org
Tue Apr 24 07:04:22 PDT 2012

Has anyone had luck building an app with one window that is Swing and the other is JavaFX?  I want to slowly moving my large app (LeonardoSketch.org)  over to JavaFX.  

I have built a new window in JavaFX but I get some init errors on startup. Instead I can put the FX content inside of a JXPanel, but many things break on the FX side like drag and drop. I would rather run the FX content in a real FX stage.  I am fine having one window be run on the FX thread and one on the Swing thread with me being responsible for synchronization via invokeLater calls.  I'm wondering if there is any magic init-mojo required.


Josh Marinacci

More information about the openjfx-dev mailing list