title: How to refresh stage in JavaFX
body: <p>I want to update my <code>fxml</code> after adding data in it.while clicking on add button in <code>priceaddonn.fxml</code> data should be transmitted to <code>Sys1.fxml</code> and table should be updated as per <code>priceAddOnn.fxml</code> input</p>
  
  <p><strong>PriceAddOnController.java</strong></p>
  
  <pre><code> @FXML
   public void handleAddOnButtonAction(ActionEvent a) {
     try {           
              Stage  stage = new Stage();
              FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("Sys1.fxml"));
              Parent root44 = (Parent) fxmlLoader.load();   
              Sys1Controller controller=fxmlLoader.&lt;Sys1Controller&gt;getController();             
              stage.setScene(new Scene(root44));               
              //stage.show();
              System.out.println("handleAddOnButtonAction get over extr a var is "+controller.nm);
              System.out.println("call function");
              controller.priceadd();              
          } catch (IOException ex) {
          Logger.getLogger(Sys1Controller.class.getName()).log(Level.SEVERE, null, ex);
      }        
  }
  </code></pre>
  
  <p><strong>Sys1Controller.java</strong></p>
  
  <pre><code>public void priceadd() {       
      try {
              Stage stage = new Stage();
              FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("PriceAddonn.fxml"));
              Parent root44 = (Parent) fxmlLoader.load();   
              PriceAddonnController controller=fxmlLoader.&lt;PriceAddonnController&gt;getController();             
              stage.setScene(new Scene(root44));               
              controller.getData();
              data.add(new Person1(controller.charge_nm,controller.chrgeval,controller.var,"Tax"));                       
          System.out.println(" charge nm is "+controller.chrgenm);
      } catch (IOException ex) {
          Logger.getLogger(Sys1Controller.class.getName()).log(Level.SEVERE, null, ex);
      }
  }
  </code></pre>