The object of this class represents the text events. The TextEvent class is generated when a character is entered in the text fields or text area. The TextEvent instance does not include the characters currently in the text component that generated the event rather we are provided with other methods to retrieve that information.
Class declaration
Following is the declaration for java.awt.event.TextEvent class:
public class TextEvent extends AWTEvent
Field
Following are the fields for java.awt.event.TextEvent class:
- static int TEXT_FIRST –The first number in the range of ids used for text events.
- a static int TEXT_LAST –The last number in the range of ids used for text events.
- static int TEXT_VALUE_CHANGED –This event id indicates that object’s text changed.
Class constructors
S.N. | Constructor & Description |
---|---|
1 | TextEvent(Object source, int id)Constructs a TextEvent object. |
Class methods
S.N. | Method & Description |
---|---|
1 | String paramString()Returns a parameter string identifying this text event. |
Methods inherited
This class inherits methods from the following classes:
- java.awt.AWTEvent
- java.util.EventObject
- java.lang.Object
Previous Page:-Click Here