JavaFX Error: Controller value already specified

后端 未结 1 993
不知归路
不知归路 2020-12-06 22:10

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);
相关标签:
1条回答
  • 2020-12-06 22:39

    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.

    0 讨论(0)
提交回复
热议问题