Right so I know my code/structure is pretty messy, I've not done MVC before and I'm pretty sure I've done it wrong anyway. I want to be able to "control" the jMenubar depending on which tab is selected.
I have a main GUI class which simply creates a new "MenuBar" and each new "PanelXXXX", where "PanelXXXX" could be "PanelDesign", "PanelSource" etc. These Panels are added as new tabs into my jTabbedpane. "PanelXXXX" all extend "Panel" which contains some extra/default values. "Panel" extends "jPanel" and implements "ActionListener". "MenuBar" extends "jMenubar". Inside "MenuBar" - I setup the different "JMenuItem"s.
This all works fine. However in my "Container" class (which implements "ActionListener"), I check the current selected tab and decide whether my forward/back buttons wrap around or not etc. - works fine too.
Now I'm stuck wondering how I will control the MenuBar without creating a new object, I could re-code the MenuBar to imeplement a Singleton class, that might work?
Hmm, I think I need "MenuBar" to implement "ActionListener"? Wait, no that wouldn't be correct...