File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Game Development and the fly likes Need help with game Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Need help with game" Watch "Need help with game" New topic
Author

Need help with game

Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
I am trying to move the ball on the drawing panel. My code seems correct but when I run it, nothing is happening.
Can anyone please tell me what I am doing wrong?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
perhaps the Ball class needs some code here

Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
It's still not working. please give me some hints.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
honestly, you will have to develop some debugging skills.

I pointed you to the empty method move(), so you added some code to move() which included this line:
this.setLocation(nextX, nextY);

now take a look at setLocation() - what do you expect it to do?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with game