Is there a way to send the java frame in front of every other opened program. I know you can use

```
 JFrame.setAlwaysOnTop(true);

```

but that just keeps it in front allways. I want it to only happen when a certain function is called. For instance, When I press a button on a frame, it will wait using Thread.sleep(10000) for ten seconds, but the I want it to just the frame to the front in case you clicked out of the window for a second. Any suggestions?