title: JavaFX stage issue with hide and show
body: <p>Im building an application that shows a window that ask the user if he want to suspend the computer with two button options, one of them its a YES and the PC suspends.</p>
  
  <p>The other button named "Later" supposed to hide the window and after an hour it appears again and ask the same question.</p>
  
  <p>Code for the "later  buttton"</p>
  
  <pre><code> noButton.setOnAction(event -&gt; {
  
  
          Done=false; //boolean to close and open the frame
          Gui gui = new Gui();
  
              try {
                  gui.start(classStage);
              } catch (Exception e) {
                  e.printStackTrace();
              }
  
          });  
  </code></pre>
  
  <p>The boolean that you see in the code is bc it was the way i think i could control that, trust me i tried in different ways but no one just help me with the issue, here is the code of the GUI class </p>
  
  <pre><code>public class Gui extends Application {
  
  public  Stage classStage = new Stage();
  
  public static boolean Done=true;
  
  public static boolean flag=true;
  
  
  public Gui() {
  
  
  }
  
  @Override
  public void start(Stage primaryStage) throws Exception {
  
      Done = Controller.isDone();
      classStage = primaryStage;
  
  
      Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
      primaryStage.setX(primaryScreenBounds.getMaxX() - primaryScreenBounds.getWidth());
      primaryStage.setY(primaryScreenBounds.getMaxY() - primaryScreenBounds.getHeight());
      primaryStage.setAlwaysOnTop(true);
      Parent root = FXMLLoader.load(getClass().getResource("MainWindow.fxml"));
      primaryStage.setTitle("Alerta suspencion de equipo");
      primaryStage.setScene(new Scene(root));
      primaryStage.setResizable(false);
      primaryStage.initStyle(StageStyle.UNDECORATED);
  
      if (Controller.isDone() == true) {
          primaryStage.show();
  
      } else if(Controller.isDone() == false) {
          primaryStage.hide();
           Platform.exit(); // this is the only way that the windows close 
  
  
      }
  }
  </code></pre>
  
  <p>i know that Platform.exit(); kills the program but when i only use .hide(); of the Stage nothing happens, the window never closed, the worst part is that when i use the Platform.exit() command i cant make the frame appear again... </p>
  
  <p>Anyone knows a way maybe easier to hide and show a window after certain time? maybe im doing this wrong. </p>
  
  <p>Regards. </p>