Java examples for JavaFX:JavaFX Thread
run On Fx Thread
//package com.java2s; public class Main { static public void runOnFxThread(final Runnable run) { if (javafx.application.Platform.isFxApplicationThread()) { run.run();/*from ww w.j ava2 s . c o m*/ } else { runOnFxThreadLater(run); } } static public void runOnFxThreadLater(final Runnable run) { javafx.application.Platform.runLater(run); } }