Generated Object

A javax.swing.JTextField is returned, unless the user passes in a subclass of JTextField as the value argument, in which case the value argument is returned.

Value Argument

The value argument can be either a JTextField, or a String. If the value argument is a string it is treated as though it were passed in as the text attribute.


See also: JComponent

Declared in JTextField

Declared in javax.swing.text.JTextComponent


No child content is accepted in a textField.


The action connected to the textField is usually fired when the 'Enter' key is pressed by the user when the textField has keyboard focus.



Observable Attributes