Is there something wrong with Swing's MVC implementation for JList?

后端 未结 7 1143
野性不改
野性不改 2020-12-11 16:08

Some time ago I asked this question. All solutions are workarounds.

Now this can\'t be. I feel that something is wrong here, but I can\'t tell if it is Swing\'s MVC

相关标签:
7条回答
  • 2020-12-11 16:54

    Swing is not exactly MVC, but has it's roots in MVC ( the difference lays in the fact, the view and the controller in Swing are more closely related than in other MVC see Swing architecture for more details ).

    But this may not seem to be the problem you're facing. It sounds like you have to validate in the event listeners, for the type of event and decide whether to ignore it or not: If the event was originated in the list do change it. If was triggered by some other control, do not.

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