TextField
public TextField(String text,
int columns)
throws HeadlessException
Constructs a new text field initialized with the specified text to be displayed, and wide enough to hold the specified number of columns. A column is an approximate average character width that is platform-dependent.
Parameters:
text - the text to be displayed. If text is null, the empty string "" will be displayed.
columns - the number of columns. If columns is less than 0, columns is set to 0.
Throws:
HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
See Also:
GraphicsEnvironment.isHeadless()