| Author |
Help needed with the Code
|
kartik rathore
Greenhorn
Joined: Oct 18, 2008
Posts: 14
|
|
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
Joined: Jul 26, 2007
Posts: 8565
|
|
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?
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
kartik rathore
Greenhorn
Joined: Oct 18, 2008
Posts: 14
|
|
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
Joined: Jul 08, 2003
Posts: 24081
|
|
|
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.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: Help needed with the Code
|
|
|