I have this code:
@Override public void start(Stage primaryStage) throws Exception{ Parent root = FXMLLoader.load(getClass().getResource("main.fxml")); primaryStage.setTitle("Hello World"); primaryStage.setScene(new Scene(root, 800, 600)); primaryStage.show(); } How can I make it so that from a completely separate controller class I replace main.fxml with server.fxml and display it accordingly?