2
I want to create a new window when the user clicks on a particular button, while that new window is open, the main window cannot be used. How can I do this in JAVAFX?
I thought to make the following command sequence in the button Onaction function:
Stage s1 = new Stage();
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
s1.setScene(scene);
s1.show();
But this leaves the main stage (which is in the start method in the main class) still operative.