This is a little class I have used and it worked just
fine, doing exactly what you want:
class ALittleWait extends Thread {
private int sleepTime;
// Just using the Thread class
// by calling superclass Thread constructor
// to get a sleeping effect for a little while
public ALittleWait(String name)
{
super(name);
sleepTime = (int) (5000);
}
}
And you call it from your main class (or whatever)
with:
ALittleWait.sleep(2000);