title: In Java, is there something like "DoEvents" from VB6
body: <p>I'm coming from VB6 and I'm new to Java. In VB6, <code>DoEvents</code> gives up the processor and allows it to process other threads. Is there a similar thing in Java? How do I use it?</p>