Docking and undocking a Netbeans Platform window, with an embedded JFXPanel results in the below exception. All of the lines in the stack trace indicate oracle code, not sure what I can do different to prevent the error.
Exception in runnable
java.lang.IllegalStateException: Not on FX application thread; currentThread = JavaFX Application Thread
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:237)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:397)
at javafx.stage.Window.setShowing(Window.java:780)
at javafx.stage.Window.show(Window.java:796)
at com.sun.javafx.stage.EmbeddedWindow.show(EmbeddedWindow.java:57)
at javafx.embed.swing.JFXPanel$7.run(JFXPanel.java:678)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)