IllegalStateException while creating a stage in another thread <p>I have a problem with opening one more stage in another thread. No exceptions appears if I'm opening this stage in the same thread.</p> <pre><code>void hashMapDeclaration(){ actions2methods.put("NEW", new Runnable() {@Override public void run() { newNetCreation(); }}); actions2methods.put("LOAD", new Runnable() {@Override public void run() { loadNetState(); }}); ...... //other hashes } HBox buttonBuilder(double spacing,double layoutX,String... bNames){ HBox lBar = new HBox(10); .... //some code for(final String text : bNames){ //in my case text variable value is "NEW" so it should run method newNetCreation Button newButton = new Button(); newButton.setText(text); .... //code newButton.setOnAction(new EventHandler&lt;ActionEvent&gt;() { @Override public void handle(ActionEvent paramT) { Thread t; EventQueue.isDispatchThread(); t = new Thread(actions2methods.get(text)); t.start(); // Start the thread System.out.println("button pressed"); } }); lBar.getChildren().add(newButton); } return lBar; } void newNetCreation(){ final Stage dialogStage = new Stage(); final TextField textField; dialogStage.initOwner(stage); dialogStage.initModality(Modality.WINDOW_MODAL); dialogStage.setFullScreen(false); dialogStage.setResizable(false); dialogStage.setScene(SceneBuilder .create() .fill(Color.web("#dddddd")) .root(textField = TextFieldBuilder .create() .promptText("Enter user name") .prefColumnCount(16) .build() ) .build() ); textField.textProperty().addListener(new ChangeListener() { public void changed(ObservableValue ov, Object oldValue, Object newValue) { System.out.println("TextField text is: " + textField.getText()); } }); dialogStage.show(); System.out.println("new net"); } </code></pre> <p>Method newNetCreation is the one that cause the problem. All actions in my program are store in a HashMap. Method buttonBuilder creates the new thread and should launch methods according to variable value and in my case he must call newNetCreation method, but when he tries, the following exception occurs:</p> <pre><code>Exception in thread "Thread-3" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-3 at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source) at javafx.stage.Stage.&lt;init&gt;(Unknown Source) at javafx.stage.Stage.&lt;init&gt;(Unknown Source) at projavafx.starterapp.ui.StarterAppMain.newNetCreation(StarterAppMain.java:400) at projavafx.starterapp.ui.StarterAppMain$7.run(StarterAppMain.java:354) at java.lang.Thread.run(Thread.java:722) </code></pre>