JavaFX - Many Static FXML Controllers

后端 未结 5 1229
囚心锁ツ
囚心锁ツ 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:11

    Definitely you should use an Application Framework that will help you to structure your code.

    If you want to try JRebirth, just cut your application in 4 parts:

    • MainModel composed by:
      • MainSceneModel
      • CaptureWindowModel
      • SettingsModel

    You can access to one from anyone by using getModel(Model.class) or send async message using sendWave(Wave).

    MainModel can use innerComponent to tightly link child-model to it.

    It's pretty simple to use, if you are interested in I can prototype you a sample app just let me know.

提交回复
热议问题