How to initialize JavaFX controllers with the same model object?

后端 未结 3 768
予麋鹿
予麋鹿 2021-02-01 03:43

Scenario

I am creating a GUI where multiple views reference the same model object.

What I am Accustom to

In Swing, if

3条回答
  •  清歌不尽
    2021-02-01 04:36

    The DataFX Framework has a new API called DataFX-Flow. With this API you can simply inject objects in a view controller. Other that Afterburner.fx Scopes are supported here. You can find an example here: http://www.guigarage.com/2013/12/datafx-controller-framework-preview/

提交回复
热议问题