143 * href="package-summary.html#threading">Swing's Threading
144 * Policy</a>.
145 * <p>
146 * <strong>Warning:</strong>
147 * Serialized objects of this class will not be compatible with
148 * future Swing releases. The current serialization support is
149 * appropriate for short term storage or RMI between applications running
150 * the same version of Swing. As of 1.4, support for long term storage
151 * of all JavaBeans™
152 * has been added to the <code>java.beans</code> package.
153 * Please see {@link java.beans.XMLEncoder}.
154 *
155 * @beaninfo
156 * attribute: isContainer false
157 * description: A component which allows for the editing of a single line of text.
158 *
159 * @author Timothy Prinzing
160 * @see #setActionCommand
161 * @see JPasswordField
162 * @see #addActionListener
163 */
164 @SuppressWarnings("serial") // Same-version serialization only
165 public class JTextField extends JTextComponent implements SwingConstants {
166
167 /**
168 * Constructs a new <code>TextField</code>. A default model is created,
169 * the initial string is <code>null</code>,
170 * and the number of columns is set to 0.
171 */
172 public JTextField() {
173 this(null, null, 0);
174 }
175
176 /**
177 * Constructs a new <code>TextField</code> initialized with the
178 * specified text. A default model is created and the number of
179 * columns is 0.
180 *
181 * @param text the text to be displayed, or <code>null</code>
182 */
|
143 * href="package-summary.html#threading">Swing's Threading
144 * Policy</a>.
145 * <p>
146 * <strong>Warning:</strong>
147 * Serialized objects of this class will not be compatible with
148 * future Swing releases. The current serialization support is
149 * appropriate for short term storage or RMI between applications running
150 * the same version of Swing. As of 1.4, support for long term storage
151 * of all JavaBeans™
152 * has been added to the <code>java.beans</code> package.
153 * Please see {@link java.beans.XMLEncoder}.
154 *
155 * @beaninfo
156 * attribute: isContainer false
157 * description: A component which allows for the editing of a single line of text.
158 *
159 * @author Timothy Prinzing
160 * @see #setActionCommand
161 * @see JPasswordField
162 * @see #addActionListener
163 * @since 1.2
164 */
165 @SuppressWarnings("serial") // Same-version serialization only
166 public class JTextField extends JTextComponent implements SwingConstants {
167
168 /**
169 * Constructs a new <code>TextField</code>. A default model is created,
170 * the initial string is <code>null</code>,
171 * and the number of columns is set to 0.
172 */
173 public JTextField() {
174 this(null, null, 0);
175 }
176
177 /**
178 * Constructs a new <code>TextField</code> initialized with the
179 * specified text. A default model is created and the number of
180 * columns is 0.
181 *
182 * @param text the text to be displayed, or <code>null</code>
183 */
|