title: How to make a Text content disappear after some time in JavaFX?
body: <pre><code>b1.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
          @Override
          public void handle(ActionEvent e) {
              try {
                  Class.forName("com.mysql.jdbc.Driver");
                  connect = DriverManager
                          .getConnection("jdbc:mysql://localhost:3306/project?"
                                  + "user=root&amp;password=virus");
                  statement = connect.createStatement();
  
                  preparedStatement = connect
                          .prepareStatement("select * from mark where clsnum = " + txt1.getText() + "");
                  rs = preparedStatement.executeQuery();
                  if (rs.next()) {
                      delete();
                  } else {
                      msg.setText("Student Not Found...!");
                  }
              } catch (ClassNotFoundException | SQLException ex) {
                  Logger.getLogger(DeleteMark.class.getName()).log(Level.SEVERE, null, ex);
              }
          }
      });
  </code></pre>
  
  <p>This is my code to display a message if the query not worked(I mean if no row is returned to ResultSet rs). msg is an object of Text and its declaration and other details are -</p>
  
  <pre><code>Text msg = new Text();
  msg.setFont(Font.font("Calibri", FontWeight.THIN, 18));
  msg.setFill(Color.RED);
  </code></pre>
  
  <p>I want to make the Text disappear after sometime, like 3 or 4 seconds. Is it possible to do it in JavaFX (with the help of timer or something else you know) ? If yes, how ?</p>