There are two dialogs. How to transfer any value from dialog2 to dialog1 : I try this: In dialog 1:
public void setCategory(String kateg) { System.out.println(kateg); pmk_id.setText(kateg); } in dialogue 2:
public void kategTreeMouseClick(MouseEvent mouseEvent) { int click = mouseEvent.getClickCount(); if (click == 2) { TreeItem<pmk_category> kateg =kategTree.getSelectionModel().getSelectedItem(); addToPMKController addCategory = new addToPMKController(); addCategory.setCategory(kateg.getValue().getCategory()); dialogStage.close(); } } As a result, the value is passed, but not displayed in the TextField , although in System.out.println(kateg); I see the transmitted value.
Tell me what's wrong.
FXstream. TryPlatform.runLater( () -> pmk_id.setText(kateg) );- Andrey M