Experience with piecewise migration Swing -> JFX
anthony.petrov at oracle.com
Mon Jun 17 06:17:59 PDT 2013
On 06/17/13 16:35, Werner Lehmann wrote:
> In addition to what has been said before, you could check Jira for
> keywords jfxpanel and/or swing. Just today we had another Mac-only
> problem. Apparently AWT is not as thread-safe on Mac as it is on
> Windows, resulting in deadlocks in native AWT code (which currently is a
> guess, not confirmed, RT-31124).
I haven't investigated deeply, but since you've mentioned cursors I
believe this issue has been fixed already. Please try 7u40 and/or 8 ea
> Even with one JFXPanel and other Swing UI on the same window, you'll get
> a problem with tab focus movement: the jfxpanel would happily receive
> focus but then users cannot "tab out" of the jfxpanel.
Did you file a bug for this issue?
> Also seen today: after closing the last JFXPanel while the Swing
> application continues, FX would "exit the platform" (not the VM) and you
> cannot use another JFXPanel. There is probably some workaround available.
You want to call Platform.setImplicitExit(false). Please see
> And just in case it has not been said before: you cannot have a Stage on
> top of a JFrame (modal or not). This forces you to wrap a JFXPanel into
> a JDialog.
To clarify: you can't make a Swing frame be a parent of an FX stage,
meaning that you can't maintain a particular z-order between the two. So
you have to wrap a JFXPanel into a JDialog to implement this behavior.
> I have also seen a performance problem. Try an indeterminate progressbar
> in a JFXPanel. The progressbar width directly correlates with CPU usage.
> With ~400px width I get about 20% CPU usage (almost one core). This is
> probably caused by constant pixel shifting to AWT.
> On 14.06.2013 17:08, Robert Krüger wrote:
>> What are the hidden problems one should be
>> aware of (other than having 2 UI threads).
More information about the openjfx-dev