- 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 - PaintEvent Class
The Class PaintEvent is used to ensure that paint/update method calls are serialized along with the other events delivered from the event queue
Following is the declaration for java.awt.event.PaintEvent class −
public class PaintEvent extends ComponentEvent
Following are the fields for java.awt.Component class −
static int PAINT − The paint event type.
static int PAINT_FIRST − Marks the first integer ID for the range of paint event IDs.
static int PAINT_LAST − Marks the last integer ID for the range of paint event IDs.
static int UPDATE − The update event type.
|Sr.No.||Constructor & Description|
PaintEvent(Component source, int id, Rectangle updateRect)
Constructs a PaintEvent object with the specified source component and type.
|Sr.No.||Method & Description|
Returns the rectangle representing the area which needs to be repainted in response to this event.
Returns a parameter string identifying this event.
void setUpdateRect(Rectangle updateRect)
Sets the rectangle representing the area which needs to be repainted in response to this event.
This class inherits methods from the following classes −