In the code below, the event queue is blocked (no "Yep!" in the output) but ONLY if mouse is over an animated control (such as interpolator) when the app starts.
If mouse is somewhere else, or after you move it out of an animated component, execution continues.
public static void main(String[] args) throws InterruptedException {
new Thread(new Runnable() {
@Override
public void run() {
Application.launch(Ensemble2.class, new String[0]);
}
}, "FX app launch thread").start();
Thread.sleep(1000);
Platform.runLater(new Runnable() {
public void run() {
System.out.println("Yep!");
}
});
}
If mouse is somewhere else, or after you move it out of an animated component, execution continues.
public static void main(String[] args) throws InterruptedException {
new Thread(new Runnable() {
@Override
public void run() {
Application.launch(Ensemble2.class, new String[0]);
}
}, "FX app launch thread").start();
Thread.sleep(1000);
Platform.runLater(new Runnable() {
public void run() {
System.out.println("Yep!");
}
});
}