0

I searched many places trying to find information or examples of how to incorporate a JMenuBar in mvc architecture. And I fail to understand how to do this.

The idea is that each menu item has its own associated panel. These panels are inserted in the main frame depending on the selection menu.

In this context, the best way to approach this is to have a great driver for all views or a sub-controller for each view?

And if this was not the most appropriate. MVC is the best architecture to do this or is there another more appropriate architecture?

BWeb
  • 19
  • 4
  • The idea is that each menu item has its own associated panel. == CardLayout – mKorbel Jul 11 '14 at 18:17
  • Swing already takes an MVC approach. Most(maybe all, haven't looked) JComponents are simply controllers with associated Model objects. It's not strictly MVC as there's a lot of crossover between Controller and View. That said, this is a pretty vague question. – Justin Reeves Jul 11 '14 at 18:21
  • Thanks for your replies. But I'm wondering ***architectures*** – BWeb Jul 11 '14 at 22:13
  • 1
    Use [`Action`](http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html); more [here](http://stackoverflow.com/a/3072979/230513). – trashgod Jul 11 '14 at 22:19

0 Answers0