I want to create a new window when the user clicks on a certain button, while this new window is open, the main window can not be used. How can I do this in JAVAFX?
I thought about doing the following sequence of commands in the button's OnAction function:
Stage s1 = new Stage();
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
s1.setScene(scene);
s1.show();
However, this leaves the main Stage (which is in the start method in the main class) still operative.