I create several component with SceneBuilder, my goal is now to use all this files for creating a complete window. But I can't load several FXML, here's what I try to do :
private MenuBar menuBar;
private Pane filtersView;
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainWindow.class.getResource("../component/menuBar/MenuBar.fxml"));
menuBar = (MenuBar) loader.load();
loader.setLocation(MainWindow.class.getResource("../component/filtersView/FiltersView.fxml"));
filtersView = (Pane) loader.load();
Here's the returning error :
Root value already specified.
Should I have to create a loader for each component ?