import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Test { public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Hello Darwin World"); shell.setLayout(new FillLayout()); Button button = new Button(shell, SWT.NONE); button.setText("A GTK+ Button"); FileDialog dialog = new FileDialog(shell, SWT.OPEN); dialog.setText("A GTK+ File Dialog"); shell.setSize(320, 240); shell.open(); dialog.open(); while(!shell.isDisposed()) { if(!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }