How do you force a java swt program to “move itself to the foreground”?
问题 Currently with swt, I sometimes want a program to arbitrarily come to the foreground (like an alarm clock might). Typically the following works (jruby): @shell.setMinimized(false) @shell.forceActive This brings the shell to the front if it was minimized. Creating a new shell at any time also brings the (new shell) to the front. So far so good, however, if the shell is not minimized, the above code just flashes (blinks) the app's icon in the taskbar. Well actually the first time you run it, it