I call the method to load the window, passing some parameters for the specific internal method of this window, but I have this exception:
GRAVE: null
javafx.fxml.LoadException: Controller value already specified.
unknown path:12
here is my method
public void openDef(String sys, String comp, String code) throws Exception {
Stage defStage = new Stage();
FXMLLoader loader = new FXMLLoader();
DefTableController cont = new DefTableController();
loader.setController(cont);
Parent frame = loader.load(getClass().getResource("defTable.fxml").openStream());
cont.getSysChoice(sys, comp, code);
Scene sceneDef = new Scene(frame);
defStage.setTitle("Défaillance du " + comp);
defStage.setScene(sceneDef);
defStage.show();
}
I do not understand why he believes that the controller is already installed? and how to fix it? thank
source
share