In Java: How can I make a Timer based repaint, instead repaint as fast as the processor can handle?

I have a Timer, which repaints every 30 milliseconds. It runs a simulation, and I want it to run the simulation as fast as possible. I know I can make the timer refresh at a quicker rate, however Java cuts off functions that did not complete in time. So i would simply like to run it at capacity.
3 answers 3