I\'m trying to open a new form window. But I want to assign some values in the constructor.
The codes I tried:
fxmlLoader.setRoot(null);
Remove the fx:controller attribute from the FXML file. That attribute is an instruction to the FXMLLoader to create a new controller: since you have already set one by calling setController it is contradictory.
fx:controller
FXMLLoader
setController