SWT从程序主显示器外部提升messageBox

时间:2014-12-11 13:02:27

标签: java multithreading swing swt

我想在不与主显示器任何接触的情况下提升MessageBox。 我试过了:

Display display = Display.getCurrent();
        final Shell shell = new Shell(display);
        Display.getCurrent().asyncExec(new Runnable() {
             public void run() {
                 MessageBox errorMessage = new MessageBox(shell, SWT.OK);
                 errorMessage.setText("File Download");
                 errorMessage.setMessage("The machine is now downloading files from the server .\n" +
                         "Please wait until this process is done and do not close the machine widow.\n");
                 errorMessage.open();

             }
            });

并尝试过:

Display display = new Display();

但是仍然在下载文件之后提出了MessageBox(我希望它是分离的)

(显示屏显示=新显示();我有异常)

提前致谢!

0 个答案:

没有答案