I'm trying to move from swing to javafx and have run into a problems I've spent all afternoon trying to figure out to no avail. I'm using a standard border pane, with a top Hbox, left Vertical pane then the main user content is in the center pane. Depending on what buttons the user presses in either the top or left menu panes, I want to switch out the content that is being displayed in the main center pane. I have been able to change the anchor pane that is being shown in this area, but am unable to get get at any other fields that I have defined in the different fxml files for pane1, pane2 etc. When I try and access them after I load the new fxml file they are always null.
I'm sure there has to be a simple way of doing this, but I haven't been able to find it.