The TextField class provides a single line Component for user input.
public class java.awt.TextField extends java.awt.TextComponent { // Constructors public TextField(); public TextField (int columns); public TextField (String text); public TextField (String text, int columns); // Instance Methods public void addActionListener (ActionListener l); public void addNotify(); public boolean echoCharIsSet(); public int getColumns(); public char getEchoChar(); public Dimension getMinimumSize(); public Dimension getMinimumSize (int columns); public Dimension getPreferredSize(); public Dimension getPreferredSize (int columns); public Dimension minimumSize(); public Dimension minimumSize (int columns); public Dimension preferredSize(); public Dimension preferredSize (int columns); public void removeActionListener (ActionListener l); public void setColumns(int columns); public void setEchoChar(char c); public void setEchoCharacter (char c); // Protected Instance Methods protected String paramString(); protected void processActionEvent (ActionEvent e); protected void processEvent (AWTEvent e); }
Constructs a TextField object of the default size.
Requested number of displayed columns.
Constructs a TextField object of the given size.
Initial text for TextField.
Constructs a TextField object with the given content.
Initial text for TextField.
Requested number of displayed columns.
Constructs a TextField object with the given content and size.
An object that implements the ActionListener interface.
Add a listener for the action event.
Component.addNotify()
Creates TextField's peer.
true if the TextField has an echo character used as a response to any input character; false otherwise. An echo character can be used to create a TextField for hidden input, like a password; the same character (e.g., "x") is used to echo all input.
The width of the TextField in columns.
The current echo character.
The minimum dimensions of the TextField.
Number of columns within TextField to size.
The minimum dimensions of a TextField of the given size.
The preferred dimensions of the TextField.
Number of columns within TextField to size.
The preferred dimensions of a TextField of the given size.
The minimum dimensions of the TextField. Replaced by getMinimumSize().
Number of columns within TextField to size.
The minimum dimensions of a TextField of the given size. Replaced by getMinimumSize(int).
The preferred dimensions of the TextField. Replaced by getPreferredSize().
Number of columns within TextField to size.
The preferred dimensions of a TextField of the given size. Replaced by getPreferredSize(int).
One of this TextField's ActionListeners.
Remove an action event listener.
New number of columns.
If columns is less than zero.
Changes the number of columns.
The character to echo for all input. To echo the characters that the user types (the default), set the echo character to 0 (zero).
Changes the character that is used to echo all user input in the TextField.
The character to echo for all input. To echo the characters that the user types (the default), set the echo character to 0 (zero).
Replaced by setEchoChar(char) for consistency with getEchoChar().
String with current settings of TextField.
TextComponent.paramString()
Helper method for toString() to generate string of current settings.
The action event to process.
Action events are passed to this method for processing. Normally, this method is called by processEvent().
The event to process.
Low-level AWTEvents are passed to this method for processing.
Dimension, TextComponent, String
This HTML Help has been published using the chm2web software. |