From last week i am working on GUI part of my assignment. Comments by Mark on MVC
pattern https://coderanch.com/t/181301/java-developer-SCJD/certification/implement-MVC was very helpful.
I have question on Menu :
I have seperated classes for each menu option in menubar like FBNFileMenu,
FBNSearchMenu, FBNBookMenu, and FBNHelpMenu. All these menu class extends JMenu. Each Menu class hold indiviual menu items(whole-part relation ship);
along with actionlistener and enable disable methods.
I have seperate FBNMenu class which extends JMenuBar; this wraps all menu classes(like FBNFileMenu, FBNSearchMenu..etc). This FBNMenu class will
be used in GUI as menu component. Idea here is extension and resusabiilty(OCP priciple). Is it write design pattern(Adapter pattern) for menu? or is there any other design pattern for menu ?
Sample code:
I am considering to have only two menu one file menu (open, close and exit as menu item) and other help menu(docmentation and about). I do not want have seperate menu for search and book, since there is only one menu item is there, these (search and book)options are shown on two seperate panels. is it ok ?
Should i have seperate classes for search and book panels or utility class with two method(for search) one to create panel with two items in row (label and combobox) and other(for booking) with label and textfield in row ? Is it good GUI design have seperate class for each GUI Component; for
Menu, Search Panel, Book Panel and Table Panel to put inside GUI ?
Thanks,
Akash