I made a JavaFX project and created the GUI for the first-login frame in the java Scene Builder. When the login is successful, the login frame must be closed and the next fr
Similar to the other answers but more precise.
@FXML public void handleCloseButtonAction(ActionEvent event) { ((Stage)(((Button)event.getSource()).getScene().getWindow())).close(); }