I am working with nested controller and I want to change the Login.fxml to a Register.fxml as you can see in image.
Do we have a method to do it or I should load Register.fxml in Dashboard and add multiple children and set the visible property?
Dashboard.fxml:
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900.0" prefWidth="1600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controller.DashboardController">
<left>
<VBox prefHeight="200.0" prefWidth="285.0" BorderPane.alignment="CENTER">
<children>
<fx:include fx:id="login" source="Login.fxml" />
</children>
</VBox>
</left>
<center>
<AnchorPane prefHeight="900.0" prefWidth="1315.0" BorderPane.alignment="CENTER_RIGHT">
<children>
<ImageView fitHeight="900.0" fitWidth="1315.0" layoutX="180.0" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<Button fx:id="minimizeButton" layoutX="1243.0" layoutY="12.0" mnemonicParsing="false" onAction="#performMinimizeWindow" text="_" AnchorPane.rightAnchor="50.0" AnchorPane.topAnchor="10.0" />
<Button fx:id="closeButton" layoutX="1278.0" layoutY="12.0" mnemonicParsing="false" onAction="#performCloseWindow" text="X" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0" />
</children>
<BorderPane.margin>
<Insets />
</BorderPane.margin>
</AnchorPane>
</center>
</BorderPane>