- SWING Tutorial
- SWING - Home
- SWING - Overview
- SWING - Environment
- SWING - Controls
- SWING - Event Handling
- SWING - Event Classes
- SWING - Event Listeners
- SWING - Event Adapters
- SWING - Layouts
- SWING - Menu
- SWING - Containers
- SWING Useful Resources
- SWING - Quick Guide
- SWING - Useful Resources
- SWING - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
SWING - ComponentEvent Class
The Class ComponentEvent represents that a component has moved, changed size, or changed visibility
Following is the declaration for java.awt.event.ComponentEvent class −
public class ComponentEvent extends AWTEvent
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.
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 has changed.
static int COMPONENT_RESIZED − This event indicates that the component's size has changed.
static int COMPONENT_SHOWN − This event indicates that the component was made visible.
|Sr.No.||Constructor & Description|
ComponentEvent(Component source, int id)
Constructs a ComponentEvent object.
|Sr.No.||Method & Description|
Returns the originator of the event.
Returns a parameter string identifying this event.
This interface inherits methods from the following classes −