| Java >
Guidelines Home Page > Java Look and Feel Design Guidelines >
Part III: The Components of the Java Foundation Classes > 9: Menus and Toolbars >
Several drop-down menus, such as File, Edit, Format, View, and Help, occur in many applications. These menus are not supplied by the JFC. The following sections show simple versions of these menus that are consistent with the Java look and feel. You can adapt these menus to suit your needs.
If your application needs the commonly used menus, place the menu titles in this order: File, Edit, Format, View, and Help. If needed, insert other menus between the View and Help menus (and sometimes between Edit and View).
The first menu in the menu bar displays commands that apply to an entire document or the application as a whole. (The first menu it the leftmost in locales with left-to-right reading order.) Typically, this is called the File menu, but in some cases another title might be more appropriate. Figure 134 illustrates common File menu items in order, with mnemonics and keyboard shortcuts.
Click here to view the corresponding code for Figure 134 (also available on the book's companion CD-ROM).Figure 134 Typical File Menu
Place commands that apply to the document or the main object (or the application as a whole) in the File menu.
If your application manipulates objects that your users might not think of as "files," give the File menu another name. Ensure that the name corresponds to the type of object or procedure represented by an entire window in your application. For example, a project management application could have Project as its first menu, or a mail application could have a Mailbox menu.
When the Close item dismisses the active window, close any dependent windows at the same time.
Provide an Exit item, which closes all associated windows and terminates the application. (Be sure to use Exit, not Quit.)
The Edit menu displays items that enable users to change or edit the contents of their documents or other data. These items give users typical editing features that apply to multiple data types, like graphics and text.
Figure 135 shows common Edit menu items in order, with mnemonics and keyboard shortcuts.Figure 135 Typical Edit Menu
Place commands that modify the contents of documents or other data in the Edit menu, including Undo, Redo, Cut, Copy, Paste, and Find.
The Swing Undo package can be used to provide Undo and Redo features.
Figure 136 shows some common Format menu items with their mnemonics.
Click here to view the corresponding code for Figure 136 (also available on the book's companion CD-ROM).Figure 136 Typical Format Menu
The View menu provides ways for users to adjust the presentation of data in the active window. For instance, the View menu in a network management application might have items that enable users to view large or small icons for network objects. Other applications might offer list views and details views. The possibilities for view names depend on the objects in your application.Figure 137 Typical View Menu
Because the View menu enables users to change only the view of the data (and not the content) in the current primary window, ensure that the commands in the View menu alter the presentation of the underlying data without changing it.
The Help menu provides access to online information about the features of your application. This menu also provides access to the application's About box, which displays basic information about the application. For details, see Designing About Boxes.
Help menu items vary according to the needs of the application. If the help system you are using includes a built-in search feature, you might want to include an Index or a Search item. Additional items might include a tutorial, bookmarks for your product's home page, a bug database, release notes, a Send Comments item, and so forth.
Figure 138 shows common Help menu items (in the typical order) with their mnemonics.
Click here to view the corresponding code for Figure 138 (also available on the book's companion CD-ROM).Figure 138 Typical Help Menu
In your Help menu, allow access to online information about the features of the application.
Place a separator before an About Application item that displays a window with the product name, version number, company logo, product logo, legal notices, and names of contributors to the product.
JavaHelp TM , a standard extension to the Java 2 SDK, can be used to build a help system for your applications.
|Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.