You have two choices:
1 — use a Swing Timer with non-repeating delay, ie, one–time use. There's a page in the tutorial that discusses the use of Swing Timers:
How to Use Swing Timers.
2 — use a thread:
Thread thread = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(3000);
} catch(InterruptedException e) {
System.out.println("interrupt");
}
}
}).start();
This will halt everything: gui response, gui updates, etc; the app will appear to freeze.