My JavaFX and FXML application loads is as follows:
A login screen. Once the credentials are input the login stage closes and the MainGui.FXML launches with its own controller: MainGuiController.java
MainGuiController also calls controllers for other GUIs because so far in my scene, all I have is a menu and a blank main body. When a menu item is selected a Connection object is passed to the new stage's controller and the stage opens up in a new window. So far so good.
However, I was thinking of changing the design and having the content that's displayed from menu interaction displayed in the empty body portion beneath my menu. I don't like the idea of having many stages open with the potential for NPEs because I do have a database that I work with.
How do I add new content [from existing FXML files] to a blank anchor pane underneath my menu every time a menu item is selected?