I am writting a simple game, and I want to cap my framerate at 60 fps without making the loop eat my cpu. How would I do this?
The simple answer is to set a java.util.Timer to fire every 17 ms and do your work in the timer event.