public class JPasswordField extends JTextField
_actionListeners, _columns, _offset, _padding_bold, _caretPosition, _document, _editable_border_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
JPasswordField() |
JPasswordField(int length_)
Use this constructor when you want to leave the text field empty
but set its length.
|
JPasswordField(java.lang.String text_)
Use this constructor when you want to initialize the value.
|
JPasswordField(java.lang.String text_,
int length_)
Use this constructor when you want to set both the initial value and the
length.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
getText()
Deprecated.
Replaced by getpassword()
|
void |
setEchoChar(char echochar_)
Set the echo character for this password field.
|
java.lang.String |
toString()
Returns a String representation of this component.
|
addActionListener, getActionCommand, getColumns, getHeight, getSize, getWidth, isEditable, minimumSize, postActionEvent, processEvent, processKeyEvent, processMouseEvent, requestFocus, setActionCommand, setBounds, setBounds, setBounds, setColumns, setEditable, setTextgetCaretPosition, getDocument, setCaretPosition, setDocument, setFontgetBorder, getInsets, setBorderaddFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isRecursivelyVisible, isTotallyObscured, isValid, isVisible, processFocusEvent, repaint, requestSync, setBackground, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColorpublic JPasswordField()
public JPasswordField(java.lang.String text_)
public JPasswordField(int length_)
public JPasswordField(java.lang.String text_,
int length_)
public void setEchoChar(char echochar_)
public char getEchoChar()
public boolean echoCharIsSet()
public java.lang.String getText()
getText in class JTextComponentpublic char[] getPassword()
public void draw()
draw in class JTextFieldpublic java.lang.String toString()
toString in class JTextFieldpublic void debug(int level_)
debug in class JTextField