AWT Event Classes-AWT TextEvent Class - AWT (Abstract Window Toolkit)

What is the use of AWT TextEvent Class?

Object of this class is used for representing the text events and is generated when a character is entered in the text fields or text area. TextEvent instance does not include the characters currently in the text component which generated the event rather it will provide other methods for retrieving that information.

Class declaration

Below is the declaration for java.awt.event.TextEvent class:


Below 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


Constructor & Description


TextEvent(Object source, int id)

Constructs a TextEvent object.

Class methods


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

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

AWT (Abstract Window Toolkit) Topics