0
顯示我有如下代碼:如何強制窗口
import org.eclipse.swt.widgets.Display;
public class ProvaShow {
public static void main(String[] args) {
try {
ProvaShow window = new ProvaShow();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
}
public void open() throws InterruptedException {
Display display = Display.getDefault();
Shell shell = new Shell();
shell.setSize(450, 300);
shell.setText("SWT Application");
Thread.sleep(3000);
shell.open();
shell.layout();
shell.forceActive();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
}
如果是打開其他應用程序(ES Web瀏覽器),我怎麼能強迫展現給我上運行的Windows?
你想留在上面的窗口其他應用程序?爲了讓他模態..? – Sorceror 2012-02-01 12:36:50