Forum Stats

  • 3,760,410 Users
  • 2,251,702 Discussions
  • 7,871,108 Comments

Discussions

how to update gui from pop up window?

3513491
3513491 Member Posts: 4
edited Jul 30, 2017 3:12PM in Java Desktop Applications

i have javafx application with parent stage and child stage (pop up)

i want when click o button in child stage the listview in parent stage update.

i use Platform.runLater() but i can not update  the listview.

Answers

  • 3513491
    3513491 Member Posts: 4
    edited Jul 30, 2017 3:12PM

    i find solution

    we think we have two stage(window),1-parent stage,2-child window(pop up window)

    1. first send the stage object of parent stage to child stage
    2. in child stage set :

    childStage.setOnHidden(event->{ Parent root=FXMLLoader.load(getClass().getResource(parent fxml));

    Scene scene=new Scene(root);

    parentStage.SetScene(scene);

    parentStage.show();

This discussion has been closed.