Non-Modal JFace Dialog?

2019-02-16 12:55发布

问题:

Simply put: Is there any way to create non-modal JFace dialog? I've tried calling setShellStyle to no avail. If I remember right this isn't a problem in swing - is this a shortcoming of SWT, or am I just misusing the widget?

TIA

回答1:

Using

setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE);
setBlockOnOpen(false);

seems to be the practice. This doesn't work for you?



回答2:

@Override
protected void setShellStyle(int newShellStyle) {           
    super.setShellStyle(SWT.CLOSE | SWT.MODELESS| SWT.BORDER | SWT.TITLE);
    setBlockOnOpen(false);
}

The above code will solve the problem..



标签: java swt jface