JavaFX threading is a black art... but since you asked.
:-)
deferAction won't help... it just runs it on the EDT later, so you
will block at some time in the future rather than immediately, but
still block. invokeLater is equivalent (and actually the desktop
profile implementation of deferAction).
The safe way is to create a javafx.async.Task and write your robot code
in Java. This way the JavaFX code is all executed on the EDT, and you
can run your robot code in the background on a non-blocking thread.
The potentially-not-safe way is to use our jfxtras XWorker (used to be
JFXWorker) or my new favorite, XEDT. They both allow you to run code
in the background that is written in JavaFX, but make sure that you do
not interact with the UI or use language features that are inherently
not thread-safe (like sequences).
I hope this helps.
Cheers,
--Steve
Andrew Hughes wrote: