Example usage for Java javax.swing JPasswordField fields, constructors, methods, implement or subclass
The text is from its open source code.
JPasswordField() Constructs a new JPasswordField , with a default document, null starting text string, and 0 column width. | |
JPasswordField(String text) Constructs a new JPasswordField initialized with the specified text. | |
JPasswordField(int columns) Constructs a new empty JPasswordField with the specified number of columns. | |
JPasswordField(String text, int columns) Constructs a new JPasswordField initialized with the specified text and columns. | |
JPasswordField(Document doc, String txt, int columns) Constructs a new JPasswordField that uses the given text storage model and the given number of columns. |
void | addActionListener(ActionListener l) Adds the specified action listener to receive action events from this textfield. |
void | addAncestorListener(AncestorListener listener) Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible or invisible. |
void | addCaretListener(CaretListener listener) Adds a caret listener for notification of any changes to the caret. |
void | addKeyListener(KeyListener l) Adds the specified key listener to receive key events from this component. |
void | copy() Invokes provideErrorFeedback on the current look and feel, which typically initiates an error beep. |
void | cut() Invokes provideErrorFeedback on the current look and feel, which typically initiates an error beep. |
boolean | echoCharIsSet() Returns true if this JPasswordField has a character set for echoing. |
AccessibleContext | getAccessibleContext() Returns the AccessibleContext associated with this JPasswordField . |
Border | getBorder() Returns the border of this component or null if no border is currently set. |
Document | getDocument() Fetches the model associated with the editor. |
char | getEchoChar() Returns the character to be used for echoing. |
char[] | getPassword() Returns the text contained in this TextComponent . |
Dimension | getPreferredSize() Returns the preferred size Dimensions needed for this TextField . |
String | getText() Returns the text contained in this TextComponent . |
void | paste() Transfers the contents of the system clipboard into the associated text model. |
void | requestFocus() Requests that this Component gets the input focus. |
boolean | requestFocusInWindow() Requests that this Component gets the input focus. |
void | selectAll() Selects all the text in the TextComponent . |
void | setActionCommand(String command) Sets the command string used for action events. |
void | setBounds(int x, int y, int width, int height) Moves and resizes this component. |
void | setColumns(int columns) Sets the number of columns in this TextField , and then invalidate the layout. |
void | setEchoChar(char c) Sets the echo character for this JPasswordField . |
void | setEditable(boolean b) Sets the specified boolean to indicate whether or not this TextComponent should be editable. |
void | setFont(Font f) Sets the current font. |
void | setInputVerifier(InputVerifier inputVerifier) Sets the input verifier for this component. |
void | setMinimumSize(Dimension minimumSize) Sets the minimum size of this component to a constant value. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component. |
void | setText(String t) Sets the text of this TextComponent to the specified text. |
void | setToolTipText(String text) Registers the text to display in a tool tip. |