I want to create a controller based JavaFX GUI consisting of multiple controllers.
The task I can't accomplish is to pass parameters from one Scene to another AND back.
Or in other words: The MainController loads SubController's fxml, passes an object to SubController, switches the scene. There shall not be two open windows. After it's work is done, the SubController shall then switch the scene back to the MainController and pass some object back. This is where I fail.
This question is very similar to this one but still unanswered. Passing Parameters JavaFX FXML It was also mentioned in the comments:
"This work when you pass parameter from first controller to second but how to pass parameter from second to first controller,i mean after first.fxml was loaded.
– Xlint Xms Sep 18 '17 at 23:15"
I used the first approach in the top answer of that thread.
Does anyone have a clue how to achieve this without external libs?