Aside from only loading and FXML, you may need to use other FXMLLoader functionality. In this case, you need to construct an object:
FXMLLoader loader = new FXMLLoader(getClass().getResource("FXMLDocument.fxml"));loader.load();FirstController controller = loader.getController();Parent root = loader.getRoot();