Java AWT

Previous Chapter 21
java.awt.event Reference
Next
 

TextEvent (New)

Name

TextEvent (New)

[Graphic: Figure from the text]

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


Previous Home Next
PaintEvent (New) Book Index TextListener (New)

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java