how to update gui from pop up window? — oracle-tech

    Forum Stats

  • 3,702,028 Users
  • 2,239,548 Discussions
  • 7,835,719 Comments

Discussions

how to update gui from pop up window?

35134913513491 Posts: 4
edited July 2017 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

  • 35134913513491 Posts: 4
    edited July 2017

    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.