| JSC >
Guidelines Home Page > Java Look and Feel Design Guidelines >
Part III: The Components of the Java Foundation Classes > 11: Text Components >
The password field is an editable text field that displays a masking character instead of the characters that users type. Asterisks are displayed in the password field by default. You can designate any Unicode character as the masking (also called "secure") character, but make sure the character is available in the current font.
The password field is commonly used in a login dialog box, as shown in Figure 178. The Password label is a separate component from the password field.
Click here to view the corresponding code for Figure 178 (also available on the book's companion CD-ROM).Figure 178 Password Field
A password field provides users with some of the editing capabilities of an editable text field, but not the cut and copy operations. For keyboard operations appropriate to password fields, see Table 29.
setEchoChar method can be used to change the masking character-- for example, from asterisks to pound signs.
|Java Look and Feel Design Guidelines, second edition.
Copyright 2001. Sun Microsystems, Inc. All Rights Reserved.