AWT TextEvent Class


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


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

S.N.Constructor & Description

TextEvent(Object source, int id)

Constructs a TextEvent object.

Class methods

S.N.Method & Description

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


E-Books Store