JavaFX - Many Static FXML Controllers

后端 未结 5 1231
囚心锁ツ
囚心锁ツ 2020-12-06 19:24

A JavaFX application exists and the application is starting from the Main.class file which extends Application:

  publ         


        
5条回答
  •  无人及你
    2020-12-06 20:12

    I think you are not supposed to declare @FXML annotated attributes with the static keyword. See this GitHub project on how you should do it. Like that you instantiate a controller only when it is needed, and your app will be stateless.

提交回复
热议问题