JTextField is a component that allows the editing of a single line of text.
new JTextField()
public function JTextField(text:String, columns:Number)
JTextField(text:String, columns:Number)
JTextField(text:String) columns default to 0
JTextField() text default to null and columns default to 0
Constructs a new TextField initialized with the specified text and columns.
text | the text to be displayed, if it is null or undefined, it will be set to ""; |
columns | the number of columns to use to calculate the preferred width; if columns is set to zero or min than zero, the preferred width will be matched just to view all of the text. default value is zero if missed this param. |
public function updateUI():Void
Description copied from JTextComponent
Resets the UI property to a value from the current look
and feel. Subtypes of JTextComponent
should override this to update the UI. For
example, JTextField
might do the following:
setUI(TextUI(UIManager.getUI(this)));
public function getUIClassID():String
Description copied from Component
Returns the UIDefaults
key used to
look up the name of the org.aswing.plaf.ComponentUI
class that defines the look and feel
for this component. Most applications will never need to
call this method. Subclasses of Component
that support
pluggable look and feel should override this method to
return a UIDefaults
key that maps to the
ComponentUI
subclass that defines their look and feel.
public function setColumns(columns:Number):Void
Sets the number of columns in this JTextField, if it changed then call parent to do layout.
columns | the number of columns to use to calculate the preferred width; if columns is set to zero or min than zero, the preferred width will be matched just to view all of the text. default value is zero if missed this param. |