import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;


public class SimpleShell
{
	// process wrapped classes first
	WrapperList wl;


	public static void main(String[] args)
	{
		System.out.println("STAAAAART ;-)");

		Display display = Display.getDefault();
		final Shell shell = new Shell(display);

		Button b = new Button(shell, SWT.NONE);
		b.setText("Click Me ;-)");
		b.setLocation(10, 10);
		b.pack();

		b.addSelectionListener(new SelectionAdapter()
				{
					public void widgetSelected(SelectionEvent e)
					{
						MessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION|SWT.OK);
						mb.setText("Hello!");
						mb.setMessage("Hello from SWT used in Eiffel...");
						mb.open();
					}
				});

		shell.setText("SimpleShell");
		shell.setSize(400, 300);
		shell.open();

		while(!shell.isDisposed())
		{
			if(!display.readAndDispatch()) display.sleep();
		}
	}
}
