• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed with the Code

 
kartik rathore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, iv been trying to design a bouncing ball program whose code is under but i dont seem to find the problem as its not drawing the ball.

i would really appreciate if any one could make the correctiion to the code for me so that it shows the ball bouncing

thanks

///////////////////////////////////////////////////////////////////////////


[MG Edited for code tags]

[ November 02, 2008: Message edited by: Maneesh Godbole ]

[ November 02, 2008: Message edited by: kartik rathore ]
[ November 02, 2008: Message edited by: Bear Bibeault ]
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kartik,

A few things:
1) Ease Up
2) Use Code Tags. I have edited your original post. As you can see it is much easier for everyone to read as it is properly indented.

I noticed you have a very similar post here.
Incidently in this post too, Pete Stein had requested you to Ease Up and use the Code Tags.
Craig Wood had been most helpful there by posting a workable code.
Did you try it out? Did it work?
 
kartik rathore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i did try the code that was posted by craig wood but it didnt seem to work so i tried to make sum changes into it and still i just dnt seem to have the graphics working in the program at all ....
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, one hint is that you don't call "paintComponent()" yourself. You call "repaint" and let Java call paintComponent() for you -- as any working examples you've looked at would undoubtedly show.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic