“No Controller specified for top level element” when programatically setting a Controller

后端 未结 2 1792
生来不讨喜
生来不讨喜 2021-01-04 07:27

I have an FXML file that has buttons with onMouseClicked attributes. I do not set a Controller up in the FXML because I have constructor injected data I want to provide to t

2条回答
  •  孤街浪徒
    2021-01-04 08:03

    Even, I don't like those notifications. I set the controllers programatically. To disable it, you need to set the highlighting level to none. To do this, open your fxml file and at the very bottom on the right side, you will see a hector icon. Click on the hector icon and set the highlight level to none by dragging the slider.

    You will need to restart the IDE for the changes to take effect. The highlighting will be set to none for that file only. Other files won't see any change in their highlighting behavior until we set their highlighting level to none again.

    Use the following link, if you were unable to find hector icon. https://www.jetbrains.com/help/idea/status-bar.html

提交回复
热议问题