I\'m new with JavaFX and I\'ve a little problem with a thread: I can execute it twice and I can\'t find why.
Here is a sum-upt of my code:
Task
With a button can fire new tasks
Button btn = new Button(); btn.setText("New task"); btn.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { Executor ex=new Executor("Task"+count); ex.start(); count++; System.out.println("Task Starting..."); } });