How to use timers for a Pong game?
<p>I'm remaking my Pong game in Java that I made in Allegro a while back, but I'm not familiar with Java timers, so I don't know how to proceed. I've setup the paddles and the ball, but the ball doesn't move because I have no timer telling it when to do so. I can move the paddles, but that's only because repaint() gets called when I press a key or release a key, and in my paintComponent() method, it updates the positions of the paddles and draws them.</p>

<p>But with the ball, it will need to constantly move, so how do I accomplish this? The most recent version of my project's code can be found on its GitHub project page here: <a href="http://www.github.com/packetpirate/Pong" rel="nofollow">http://www.github.com/packetpirate/Pong</a></p>

<p>Thanks for any help.</p>
