AWT ComponentEvent Class

  • Post author:
  • Post category:AWT
  • Post comments:2 Comments
ComponentEvent class

Introduction

The ComponentEvent class represents that a component moved, changed size, or changed the visibility.

Class declaration

Following is the declaration for java.awt.event.ComponentEvent class:

public class ComponentEvent
   extends AWTEvent

Field

Following are the fields for java.awt.Component class:

  • static int COMPONENT_FIRST — The first number in the range of ids used for component events.
  • static int COMPONENT_HIDDEN –This event indicates that the component was rendered invisible.
  • a static int COMPONENT_LAST — The last number in the range of ids used for component events.
  • static int COMPONENT_MOVED — This event indicates that the component’s position changed.
  • static int COMPONENT_RESIZED — This event indicates that the component’s size changed.
  • a static int COMPONENT_SHOWN — This event indicates that the component was made visible.

Class constructors

S.N.Constructor & Description
1ComponentEvent(Component source, int id)Constructs a ComponentEvent object.

Class methods

S.N.Method & Description
1Component getComponent()Returns the originator of the event.
2String paramString()Returns a parameter string identifying this event.

Methods inherited

This interface inherits methods from the following classes:

  • java.awt.AWTEvent
  • java.util.EventObject
  • java.lang.Object

Previous Page:-Click Here

This Post Has 2 Comments

  1. amb superslot

    Awesome article post.Thanks Again.

Leave a Reply