I have a left VBox with Hyperlinks and a right Vbox that should display the items of the Hyperlinks.For e.g. i got the Hyperlinks "bar-chart" and "rectangle". If i click on barchart the rightvbox should display a bar-chart. and if i click now on"rectangle" the right vbox change and show now a rectangle.
I dont know how to change the right vboxchild from the actual used controller without open a new window.(with the same layout only with another right vbox) I think there must be sth like rightvbox.getChildren().set??? and add all Items.
I use JavaFX Scene Border.( Have at the moment 2 FXML data with same layout only the right vbox is different is it possible to load all childrens of the vbox of 2nd fxml and update the actual used Controller? )
if i click on the hyperlink "Forschung" the right vbox should look like this:
I think you are just looking for
rightvbox.getChildren().setAll(...);
and just pass in all the nodes you want rightvbox
to contain. (Can be just one node, or even no nodes if you want to clear it entirely.)
If you know rightvbox
always just contains one item, then you can do
rightvbox.getChildren().set(0, node);
where node
is the node you want it to display.