AWT TextEvent Class

Advertisements


The object of this class represents the text events.The TextEvent is generated when 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.

  • 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

<0tr>
S.N.Constructor & Description
1TextEvent(Object source, int id)
Constructs a TextEvent object.

Class methods

S.N.Method & Description
1String 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



Advertisements
Advertisements