本人在把SWT的Shell属性设置成SWT.RESIZE之后,Shell的Title和最大化最小化关闭按钮都没有了。现在我想实现,Shell在最前面的时候,点击任务栏里的图标能够实现Shell最小化,再单击能还原的功能。
PS,是任务栏里的图标,长的那个,不是系统托盘。运行下面的程序会在任务栏里出现SWT Application的字样的。现在代码如下,请高人指点。package test;import org.eclipse.swt.SWT;public class AppWindow { protected Shell shell; /**
 * Launch the application.
 * 
 * @param args
 */
public static void main(String[] args) {
try {
AppWindow window = new AppWindow();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
} /**
 * Open the window.
 */
public void open() {
Display display = Display.getDefault();
createContents(display);
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
} /**
 * Create contents of the window.
 */
protected void createContents(Display dis) {
shell = new Shell(SWT.RESIZE);
shell.setSize(450, 300);
shell.setText("SWT Application"); shell.setLayout(new FillLayout());
Composite composite = new Composite(shell, SWT.BORDER);
composite.setBackground(new Color(dis, 255, 255, 255));
}
}