/** * Configure the shell. * @param newShell */ @Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.addListener(SWT.Close, new Listener() { public void handleEvent(Event event) { System.exit(0); } }); }
创建Window后修改重写的configureShell方法