This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Menu" Watch "Menu" New topic


Ranch Hand

Joined: Aug 03, 2000
Posts: 169
Please correct me if i am wrong..
1. Container can be added to container except windows(window,frame,dialog).
2. Menubar can only be added to Frames.
3. PopupMenu can be added to all Components.
4.PulldownMenu can be added to only Menubar or PulldownMenu.
5. MenuItem can have Menu,MenuItem
Now some clarifications please..
Menu can conatin ??
1.Menu 2.MenuSeperator 3. MenuItem 4.CheckboxMenuItem 5.Menubar
Menubar can contain?
1.Menu 2. Menubar 3.MenuItem

- Thanks
Ranch Hand

Joined: Aug 03, 2000
Posts: 169
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Doit,
I don't think Menu and Menubar can contain other Menubar. There are no methods that can add a Menubar to a Menu or Menubar in JDK1.3 API Doc. If you say Menubar can contain MenuItems because Menubar can cantain menus and MenuItems can be added to menus, I'd agree with you. So Menubar can contain
1.Menu 2.MenuSeperator 3. MenuItem 4.CheckboxMenuItemMenu 5.MenuShortcut
Also I don't think MenuItem can have Menu and MenuItem, because the MenuItem class definse a menu item that has a textual label, we cannot add a Menu or MenuItem object to a MenuItem object, but we do can add a Menu or MenuItem object to a Menu object.
Just my opinon!
Ranch Hand

Joined: Aug 03, 2000
Posts: 169
Can u guys please have a look at this also....
- Thanks
I agree. Here's the link:
subject: Menu
It's not a secret anymore!