The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

swing Graphics

Posted by Alex Rein on September 23, 2000 at 4:33 PM

I'm creating an applet of a ball bouncing across a panel. Try as I might, I cannot get the Graphics class to paint the ball on the screen. I'm logging the coordinates where the ball should be, and can virtually "see" the ball bounce across the panel. However, the graphical representation of the ball is not there. I have all my paint commands in paintComponent(). I've even tried calling repaint() to no avail. I am not calling any of the old AWT methods like paint() or update(). Might this have something to do with which Graphics object gets painted on? Please help me figure this out - it's driving me nuts!



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us