Java Observer/Observable pattern does not Notify

后端 未结 1 785
小鲜肉
小鲜肉 2021-01-15 18:13

I am trying to build a simple Java application with SWT using the MVC pattern. I would like to be able to automatically update the view when something happens in the backgro

相关标签:
1条回答
  • 2021-01-15 18:32

    From what I can tell, the while loop in the PenguinView constructor is blocking your main thread, so the Controller never gets instantiated and the observer is never added.

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