Author
Need help with game
Krupa Patel
Greenhorn
Joined: Apr 18, 2012
Posts: 10
posted Apr 27, 2012 19:45:32
0
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
posted Apr 27, 2012 20:39:46
0
perhaps the Ball class needs some code here
Krupa Patel
Greenhorn
Joined: Apr 18, 2012
Posts: 10
posted Apr 27, 2012 21:43:40
0
It's still not working. please give me some hints.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted Apr 28, 2012 00:40:40
0
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?
subject: Need help with game