charvax.swing
Class JPasswordField
public class JPasswordField
JPassword allows the editing of a single line of text; it indicates
that something was typed, but does not display the characters that
were typed.
The JPasswordField class, being a subclass of JComponent, has a setBorder()
method which allows an optional Border to be set.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
JPasswordField() - Construct a text field.
|
JPasswordField(String text_) - Use this constructor when you want to initialize the value.
|
JPasswordField(String text_, int length_) - Use this constructor when you want to set both the initial value and the
length.
|
JPasswordField(int length_) - Use this constructor when you want to leave the text field empty
but set its length.
|
void | debug(int level_)
|
void | draw() - Called by this JPasswordField's parent container.
|
boolean | echoCharIsSet() - Get the flag which indicates whether the echo character
has been set.
|
char | getEchoChar() - Get the echo character for this text field.
|
char[] | getPassword() - Returns the password value as an array of chars.
|
String | getText() - Replaced by getpassword()
|
void | setEchoChar(char echochar_) - Set the echo character for this password field.
|
String | toString() - Returns a String representation of this component.
|
addActionListener , debug , draw , getActionCommand , getColumns , getHeight , getSize , getWidth , isEditable , minimumSize , postActionEvent , processEvent , processKeyEvent , processMouseEvent , requestFocus , setActionCommand , setColumns , setEditable , setFont , setText , toString |
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
JPasswordField
public JPasswordField()
Construct a text field. The initial string is empty and the
number of columns is 10.
JPasswordField
public JPasswordField(String text_)
Use this constructor when you want to initialize the value.
JPasswordField
public JPasswordField(String text_,
int length_)
Use this constructor when you want to set both the initial value and the
length.
JPasswordField
public JPasswordField(int length_)
Use this constructor when you want to leave the text field empty
but set its length.
draw
public void draw()
Called by this JPasswordField's parent container.
- draw in interface JTextField
echoCharIsSet
public boolean echoCharIsSet()
Get the flag which indicates whether the echo character
has been set.
getEchoChar
public char getEchoChar()
Get the echo character for this text field.
getPassword
public char[] getPassword()
Returns the password value as an array of chars.
setEchoChar
public void setEchoChar(char echochar_)
Set the echo character for this password field.
toString
public String toString()
Returns a String representation of this component.
- toString in interface JTextField