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