1

This is the function which called on clicking save button in save wizard FXML.

 @FXML
 public void Onsave() {
 // Handle Button event.
    System.out.println(myButton9.getId());


myButton9.setOnAction((event) - > {
    String text1 = textfield.getText();


    System.out.println(text1);
    System.out.println("Save Clicked....");
    pane.setVisible(false);







    {
        Node node = (Node) event.getSource();

        //  pane.setVisible(false);
        Stage stage = (Stage) node.getScene().getWindow();

        stage.close();

        System.out.println(flag4);

        //  Call Create Tree View Node function(args1)
        //args1 = Test Suite Name

    }

});

On clicking the save button an FXML is closed which leads to a main screen where i have to hide a pane. Now when i click on save there is a null pointer exception. The Pane ID in scene builder is "pane". Is there is way somehow that the main FXML and SAVE dialogue FXML can be linked and the on clicking the save button i can get the refrence of the pane and it does not show null value. I tried to use the flag but after the stage is closed the flag changes to its default value. Also if anyone can suggest do help me in creating the tree view in main FXML with the arguements of text1.

0 Answers0