How to avoid Not on FX application thread; currentThread = JavaFX Application Thread error?

Calling

Platform.runLater(new Runnable(){
// do your GUI stuff here
});

will fix it.

Leave a Comment