[Chapter 21] TextEvent
Author: John Zukowski
Date: Thu Jul 31 15:22:33 1997

#

| Chapter 21 java.awt.event Reference |

# TextEvent

## Name

TextEvent

##

## Description

Text events are generated by text components when their contents change, either programmatically or by a user typing.

## Class Definition

    public class java.awt.event.TextEvent
       extends java.awt.AWTEvent {
      // Constants
      public final static int TEXT_FIRST;
      public final static int TEXT_LAST;
      public final static int TEXT_VALUE_CHANGED;
      // Constructors
      public TextEvent (Object source, int id);
      // Instance Methods
      public String paramString();
    }

## Constants

### TEXT_FIRST

#### public final static int TEXT_FIRST

Specifies the beginning range of text event ID values.

### TEXT_LAST

#### public final static int TEXT_LAST

Specifies the ending range of text event ID values.

### TEXT_VALUE_CHANGED

#### public final static int TEXT_VALUE_CHANGED

The only text event type; it indicates that the contents of something have changed.

## Constructors

### TextEvent

#### public TextEvent (Object source, int id)

Parameters

  source

    The object that generated the event.

  id

    The type ID of the event.

Description

  Constructs a `TextEvent` with the given characteristics.

## Instance Methods

### paramString

#### public String paramString()

Returns

  String with current settings of the `TextEvent`.

Overrides

  `AWTEvent``.paramString()`

Description

  Helper method for `toString()` to generate string of current settings.

## See Also

`AWTEvent`, `TextListener`

PaintEvent |  | TextListener