Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Geeske Bakker   on Feb 15 In Java Category.

  
Question Answered By: Jimmie Ramirez   on Feb 15

Like some other people have said, I'd still try to do this in your
paint(Graphics g) method. paint automatically  gets called when the
window gets resized or programs are switched between. If you really
don't want to do it in the paint method, then in your drawGraphic()
method don't use any arguments, but instead make the first line

Graphics g=getGraphics();

This will make it so g draws to the right place. I hope this helps.

Share: