|
-
Aug 16th, 2005, 02:37 PM
#1
Thread Starter
Lively Member
Question about getGraphics() method.
Hey guys.
this thing is the this will work:
public void mouseReleased(MouseEvent evt) {
Graphics g = getGraphics();
g.drawLine(...);
}
but this wont:
Graphics g = getGraphics();
public void mouseReleased(MouseEvent evt) {
g.drawLine(...);
}
the question is why?
it is the same with the paint methode too, the graphics has to be created inside? why wont the outside work?
thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|