AWT Event Classes-AWT PaintEvent Class - AWT (Abstract Window Toolkit)

What is the use of AWT PaintEvent Class?

Introduction

PaintEvent class is used for ensuring that paint/update method calls are serialized along with the other events delivered from the event queue

Class declaration

Below is the declaration for java.awt.event.PaintEvent class:

Field

Below 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.

Class constructors

S.N.

Constructor & Description

1

PaintEvent(Component source, int id, Rectangle updateRect)

Constructs a PaintEvent object with the specified source component and type.

Class methods

S.N.

Method & Description

1

Rectangle getUpdateRect()

Returns the rectangle representing the area which needs to be repainted in response to this event.

2

String paramString()

Returns a parameter string identifying this event.

3

void setUpdateRect(Rectangle updateRect)

Sets the rectangle representing the area which needs to be repainted in response to this event.

Methods inherited

This class inherits methods from the following classes:

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

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

AWT (Abstract Window Toolkit) Topics