set the content of an anchorPane with fxml file
问题 I use the accordion control. Depending on the titled pane, I need to load a fxml file into an anchorPane. So I have two parts: one for accordion and another one for anchorPane to display contents depending on click. @FXML private StackPane tmpPane; @FXML private void itemMembres(MouseEvent event) throws IOException { tmpPane.getChildren().add((Node)FXMLLoader.load(getClass().getResource("/view/test.fxml"))); } tmpPane is an anchorPane in the view. thanks 回答1: I found the solution Create a