Fadderman
Fadderman

Reputation: 19

Creating a method for defining a area

What is the best way to make all the coordinates in an area as on object, I need it for MouseListener so that when I click on an area that area gets repainted?

Upvotes: 1

Views: 108

Answers (2)

trashgod
trashgod

Reputation: 205805

java.awt.geom.Area, which conveniently implements the Shape interface, is a good choice.

Upvotes: 0

z7sg Ѫ
z7sg Ѫ

Reputation: 3203

A Rectangle specifies an area.

Upvotes: 2

Related Questions