I want to be able to show a set of pictures that would result in a primitive sort of animation. I'd like to do something lighter than making my thread sleep. Is there a way to pause the code without pausing the thread, other than something like a for-next loop of 1 to 2000 just to take up time? Thanks.
Yes look at the Timer classes. I think there are two one in java.util and one in javax.swing I think. (I would look it up but am on the phone now). You would use one of those to schedule a change to happen at some defined interval, and provide a task to execute at that interval.
Beware: Last time I tried anything big in Swing, it took something like 30ms for the display to repaint itself. Which means that running the Timer every 20ms may result in frames being missed out. Computer have got a lot faster since then, so that problem may not apply any more.
I think it will be the Swing timer you want. There are actually three Timers in the Java7 API. That is the bad news. The good news, however, is that the Java Tutorials tells you all about Swing timers.