How does JavaFX close the pop-up window?

clicking the button in the MainStageController controller will open a new window. How to judge that if this window pops up on the second click, it will not pop up

 @FXML
  private void handleSubmitButtonAction(ActionEvent event) {
    actionTarget.setText("...");

    /**
     * stage
     */
    Stage stage = (Stage) rootGridPane.getScene().getWindow();
    stage.close();

    // stage
    Stage secondStage = new Stage();
    final JmetroStageView view = new JmetroStageView();
    ApplicationContext context = SpringContextUtil.getApplicationContext();
    view.setApplicationContext(context);
    secondStage.setScene(new Scene(view.getView()));
    secondStage.show();
  }
Dec.13,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3cf56-2c36d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3cf56-2c36d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?