Java tutorial
//package com.java2s; import javafx.concurrent.Task; public class Main { public static void runTaskLater(Runnable runnable) { Task task = new Task() { @Override protected Object call() throws Exception { runnable.run(); return null; } }; new Thread(task).start(); } }