I am working on Java GUI I've got method (standardLoginScreen) which initialize Login screen, method is called by different controller.
Login screen has submit button which is handled by handleSubmitButton. I am struggling with closing Login screen using submit button.
I have tried various combinations but nothing seems to be working. Please share your thoughts.
public class StandardController {
public Button submitButton;
public TextField textField;
public PasswordField passwordField;
//Call Standard Login screen
public void standardLoginSceen() throws IOException {
Stage standardStage = new Stage();
standardStage.setTitle("Standard Login Screen");
Parent root = FXMLLoader.load(getClass().getResource("StandardSignGui.fxml"));
standardStage.initModality(Modality.APPLICATION_MODAL);
standardStage.setScene(new Scene(root));
standardStage.show();
}
//Handles Submit button
public void handleSubmitButton() throws IOException {
//Closing standardStage
}
}
}