aspose file tools*
The moose likes GWT and the fly likes Difference between MenuBar and MenuItem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Difference between MenuBar and MenuItem" Watch "Difference between MenuBar and MenuItem" New topic
Author

Difference between MenuBar and MenuItem

Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 46
What is difference between MenuBar and MenuItem...


Regards,
Nil
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10355
    
    8

"Nil Pat"
Please check your private messages for an important administrative matter


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10355
    
    8

Coming back to your question. From the API docs
A standard menu bar widget. A menu bar can contain any number of menu items, each of which can either fire a Command or open a cascaded menu bar.

An entry in a MenuBar. Menu items can either fire a Command when they are clicked, or open a cascading sub-menu


Consider an application with File, Edit, View etc. The component on which these are displayed is the MenuBar. File Edit etc are the menus.

Ganesan Ponnusamy
EPractice Labs Support
Ranch Hand

Joined: Nov 07, 2005
Posts: 249
A menu provides a space-saving way to let the user choose one of several options. Other components with which the user can make a one-of-many choice include combo boxes, lists, radio buttons, spinners, and tool bars.

Menus are unique in that, by convention, they aren't placed with the other components in the UI. Instead, a menu usually appears either in a menu bar or as a popup menu. A menu bar contains one or more menus and has a customary, platform-dependent location — usually along the top of a window. A popup menu is a menu that is invisible until the user makes a platform-specific mouse action, such as pressing the right mouse button, over a popup-enabled component. The popup menu then appears under the cursor.

Read more at http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10355
    
    8

Ganesan,
Since the OP has asked the question in the GWT forum, I doubt the link you have provided would be relevant.
Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 46
Maneesh Godbole wrote:Coming back to your question. From the API docs
A standard menu bar widget. A menu bar can contain any number of menu items, each of which can either fire a Command or open a cascaded menu bar.

An entry in a MenuBar. Menu items can either fire a Command when they are clicked, or open a cascading sub-menu


Consider an application with File, Edit, View etc. The component on which these are displayed is the MenuBar. File Edit etc are the menus.





Thanks for your replay but,
i m asking, we can give command in MenuBar. then what is real need of MenuItem???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between MenuBar and MenuItem