Jayesh A Lalwani wrote:You might want to call repaint on a timer thread, and update the ball's posiiton in it's own thread. also, looking at the code that you have posted, aside from the repaint the balls should move so fast that you would freak. Can you remove the call to repaint and see how long it takes?
Rob Spoor wrote:For a fluent movement you should have a frame rate of at least 24 frame per second. That's what's used in TV and film these days, because that's the rate at which the eye stops seeing separate images and starts seeing fluent motions. Note however that the movie makers are starting to switch to 48 fps; The Hobbit, coming out next month, will be one of the first movies filmed at 48 fps.
Of course, 24 fps is equivalent of a delay between calls of 1000 / 24 which is 41. Use 20 for a frame rate of 48 fps.