Class org.aswing.JTextField

Description

JTextField is a component that allows the editing of a single line of text.

Field Index

Inherited from JTextComponent

Inherited from Component

Inherited from EventDispatcher

Method Index

new JTextField()
getColumns(), getUIClassID(), setColumns(), updateUI()

Inherited from JTextComponent

Inherited from Component

Inherited from EventDispatcher

Constructor Detail

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.

Parameters

textthe text to be displayed, if it is null or undefined, it will be set to "";
columnsthe 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.

See Also

Method Detail

updateUI

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)));
 

Overrides

updateUI() in org.aswing.JTextComponent

getUIClassID

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.

Overrides

getUIClassID() in org.aswing.Component

setColumns

public function setColumns(columns:Number):Void

Sets the number of columns in this JTextField, if it changed then call parent to do layout.

Parameters

columnsthe 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.

getColumns

public function getColumns():Number

See Also