Currently with swt, I sometimes want a program to arbitrarily come to the foreground (like an alarm clock might).
Typically the following works (jruby):
This worked for me on Windows 7 and Ubuntu:
private void bringToFront(final Shell shell) { shell.getDisplay().asyncExec(new Runnable() { public void run() { shell.forceActive(); } }); }