Home > Articles > Programming > Java

Java" Look and Feel Design Guidelines: Menus

  • Print
  • + Share This
This chapter helps you design usable menus. It provides guidelines for designing menu elements—menu titles, menu items, mnemonics, common menus, and contextual menus.
This chapter is excerpted from Java™ Look and Feel Design Guidelines (Sun Microsystems, Inc. and Addison-Wesley, 1999).
This chapter is from the book

In most applications, menus are one of the main ways that users issue commands. To provide maximum usability, menus must be logically ordered and easily accessible.

This chapter helps you design usable menus. It provides guidelines for designing:

  • Menu elements—menu titles, menu items, mnemonics, and so on

  • Common menus—menus found in most applications

  • Contextual menus—menus whose items affect the object or area under the pointer

To understand this chapter, you should be familiar with the menu-related terms (such as drop-down menu). This chapter is intended only for applications with menus.

Menu Elements

Figure 22 shows menu elements in a typical application.

In Figure 22:

  • Each menu title consists of exactly one word.

  • The menu titles fit in a single line in the menu bar.

  • The command name in each menu item is a single word or a short phrase, such as "Save As."

  • No menu item has a command name identical to the menu's title. (For example, no item in the File menu is labeled "File.")

  • All menu titles and menu items use headline capitalization style. (For more information about headline capitalization, see Chapter 4 of Java Look and Feel Design Guidelines, 2d ed.)

Figure 22 Menu Elements

Menu elements in most applications should have these characteristics, each of which promotes usability.


  • When a window is at its default size, ensure that the titles of its drop-down menus all fit on a single line in the menu bar, without being truncated.

  • Ensure that the title of a drop-down menu consists of exactly one word.

  • In drop-down menus, ensure that the label of each menu item differs from the menu title.

Keyboard Shortcuts and Mnemonics for Menu Items

Keyboard shortcuts and mnemonics are keyboard equivalents to menu items.

  • A keyboard shortcut is a keystroke combination (usually a modifier key and a character key, like Control-C) that activates a menu item from the keyboard, even if the relevant menu is not currently displayed.

  • A mnemonic is an underlined alphanumeric character in a menu title or menu item. A mnemonic shows a user which key to press (sometimes in conjunction with the Alt key) to activate a menu item or navigate to it.

An item's mnemonic differs from its keyboard shortcut. Figure 22 on page 31 shows mnemonics and keyboard shortcuts for items in a typical File menu.

Table 5 lists mnemonics for typical menus and menu items. To use the mnemonics in Table 5, users can simultaneously press the Alt key and the character key that corresponds to the underlined letter or numeral. (For more information, see Chapter 6 of Java Look and Feel Design Guidelines, 2d ed.)

Table 5 Common Mnemonics

Menu Title

Menu Items


New, New Window, Open, Open in New Window, Open in Current Window, Close, Save, Save As, Page Setup, Print, Preferences, File Properties1, Exit


Undo, Redo, Cut, Copy, Paste, Delete, Find, Find Again, Select All


Bold, Italic, Underline, Align Left, Align Center, Align Right


Large Icons, Small Icons, List, Details, Sort By, Filter, Zoom In, Zoom Out, Refresh


Contents, Tutorial, Index, Search, About Application-Name

Table 6 lists common keyboard shortcuts.

Table 6 Common Keyboard Shortcuts


Equivalent Menu Item


New (File menu)


Open (File menu)


Close (File menu)


Save (File menu)


Print (File menu)


Undo (Edit menu)


Redo (Edit menu)


Cut (Edit menu)


Copy (Edit menu)


Paste (Edit menu)


Delete (Edit menu)


Find (Edit menu)


Find Again (Edit menu)


Replace (Edit menu)


Select All (Edit menu)


Bold (Format menu)


Italic (Format menu)


Underline (Format menu)


Justify (Format menu)


Align Left (Format menu)


Align Center (Format menu)


Align Right (Format menu)




Contextual help



For more information about keyboard shortcuts and mnemonics, see those topics in Chapter 6 of and elsewhere in that book.


  • Assign mnemonics to all menu titles and menu items. Use the mnemonics in Table 5 if your application includes any of the menu titles and menu items listed there.

  • Provide keyboard shortcuts for frequently used menu items. Use the keyboard shortcuts in Table 6, if possible.

Available and Unavailable Items

A menu item is dimmed when its command is unavailable. In Figure 23, the Paste and Paste Special items are unavailable and, therefore, dimmed.

Figure 23 Menu with Unavailable Items


Dim a menu item if it represents an unavailable command, and users can make that command available without exiting the application. If the command becomes available, undim the menu item. (For more information on available and unavailable menu items, see Chapter 9 of Java Look and Feel Design Guidelines, 2d ed.)

Additional Conventions for Menu Items

Like the conventions described so far in this chapter, the following conventions help users to work with menus.


You can group menu items by inserting separators between groups. In Figure 23, the Undo and Redo items of the Edit menu are a group, set apart from the menu's other groups by a separator.


An ellipsis (...) at the end of a menu item indicates that an application needs additional user input to execute the item's command. An ellipsis indicates that the application will display a dialog box before executing the command. However, not all menu items that open additional windows should have an ellipsis. For example, the About item in a Help menu should not end in an ellipsis.


  • Place an ellipsis (...) at the end of a menu item only if that item opens a dialog box that requests user input for completing an action.

  • Do not place an ellipsis (...) after a menu item that opens a property window.

Menu Item Graphics

You can place graphics before the leading edge of menu items, as in Figure 22 on page 31.

Provide menu item graphics only if there are corresponding toolbar button graphics in your application. The graphics help users associate the toolbar button with the corresponding menu command. Provide menu item graphics for all the qualified menu items or for none of them.


The recommended menu graphics are at the following web site: http://developer.java.sun.com/developer/techDocs/hi/repository/

  • + Share This
  • 🔖 Save To Your Account