This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes noob needs paint help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "noob needs paint help" Watch "noob needs paint help" New topic
Author

noob needs paint help

ed jones
Greenhorn

Joined: Oct 01, 2008
Posts: 11
hi,

this is some code taken from the net, modified a bit, that I'm trying to understand. The idea is to bounce a ball. Currently the ball bounces in a continuous line, but I can't see where I'm messing up.

thanks for your time
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43423
    
  32
Some very old-fashioned looking code there, with _x and _y. That is an acceptable format in C, but not considered correct style in Java.
And some odd features like an empty catch and a SUID of 1L. Also using thread priorities (which is probably unnecessary) may lose portability.

Try super.paint(g); as the first line of the paint() method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: noob needs paint help
 
It's not a secret anymore!