final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
new LayoutExample(shell);
shell.setText(LayoutExample.getResourceString("window.title"));
shell.addShellListener(new ShellAdapter() {
public void shellClosed(ShellEvent e) {
Shell[] shells = display.getShells();
for (int i = 0; i < shells.length; i++)
if (shells[i] != shell)
shells[i].close();