I have made a simple JavaFX application, but I would like the main window to open a secondary window when the user clicks a button.
What would be the simplest way to accomplish this?
I have made a simple JavaFX application, but I would like the main window to open a secondary window when the user clicks a button.
What would be the simplest way to accomplish this?
Button b = new Button(); b.setOnAction(new EventHandler() { @Override public void handle(ActionEvent e) { Stage stage = new Stage(); //Fill stage with content stage.show(); } });