java.sun.com >
Guidelines Home Page > Java Look and Feel Design Guidelines
>
Part III: The Components of the Java Foundation Classes
> 10: Basic Controls >
Checkboxes
  PreviousNextContents/Index/Search


Checkboxes

A checkbox is a control that represents a setting or value with an on or off choice. The setting of an individual checkbox is independent of other checkboxes--that is, more than one checkbox in a set can be checked at any given time.

A check mark within the checkbox indicates that the setting is selected. The following figure shows both available and unavailable checkboxes in selected and unselected states.

Figure 157   Checkboxes

Checkboxes

The user clicks a checkbox to switch its setting from off to on, or on to off. When a checkbox is unavailable, the user cannot change its setting.

For a list of keyboard operations for checkboxes, see Table 15.

 Use the checkbox graphic that is supplied with the component (the square box with or without the check mark inside).

 Although checkboxes and independent toggle buttons have the same function, as a general rule, use checkboxes in dialog boxes and menus, and use toggle buttons with a graphic in toolbars.

 Display checkbox text to the right of the graphic unless the application is designed for locales with right-to-left writing systems, such as Arabic and Hebrew. In this case, display the text to the left of the graphic.

 The setMnemonic method can be used to specify mnemonics in checkboxes.

In addition to standard checkboxes, the JFC includes a component that is the functional equivalent of the checkbox for use in menus. See Checkbox Menu Items for more information.

See Checkbox and Radio Button Layout and Spacing for specific measurement guidelines.


Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.
PreviousNextContents/Index/Search