質問

Is there a way to avoid concurrency when using Swing embedded in JavaFX8 (swingNode) or vice versa (JFXPanel) ?
I have two threads (the EDT and the FX application) which manage the UI, this can cause unexpected results...

役に立ちましたか?

解決

No, it is not officially possible currently. In both frameworks changes to the structure can only be done on the respective UI thread.

However, in the future this may change, but I do not know of any concrete plans that oracle may have and I cannot find an appropriate task in their jira.

edit: I found the specific thread about this on the javafx mailinglist: http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-August/009541.html

jira issue: https://javafx-jira.kenai.com/browse/RT-30694

appearently there is an experimental system property that can be set to enable a "single threaded mode": -Djavafx.embed.singleThread=true

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top