| Author |
graphics fillRect and getColor
|
prashant sushant
Greenhorn
Joined: Jul 24, 2011
Posts: 1
|
|
|
the fill Rect,setColor etc are all abstarct methods.....so how can we direclty use them with a graphics opject....
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Welcome to the Ranch!
The Graphics object that is passed to the paint methods is an instance of some unknown sub class of Graphics. Usually it's also an instance of an unknown subclass of Graphics2D. That's all you need to know; you can use the methods defined in Graphics (and Graphics2D after casting) without having to worry about how and where they are implemented.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
prashant, we don't have too many rules around here, but we do ask that you BeForthrightWhenCrossPostingToOtherSites.
http://www.java-forums.org/awt-swing/46836-graphics-fillrect-getcolor.html
edit And http://www.javaprogrammingforums.com/awt-java-swing/10055-graphics-fillrect-getcolor.html
|
luck, db
There are no new questions, but there may be new answers.
|
 |
 |
|
|
subject: graphics fillRect and getColor
|
|
|