FileDocCategorySizeDatePackage
Ch07_03.javaAPI DocExample1182Tue Nov 18 14:31:10 GMT 2003org.eclipsebook.ch07

Ch07_03

public class Ch07_03 extends Object
author
Steven Holzner To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		Display display = new Display ();
		final Shell shell = new Shell (display);
		shell.setSize(300, 200);
		shell.setLayout(new RowLayout());
		
		final Composite composite = new Composite(shell, SWT.NONE);
		GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 4;
		composite.setLayout(gridLayout);
		
		for (int loopIndex = 0; loopIndex < 18; loopIndex++) {
			Button button = new Button(composite, SWT.PUSH);
			button.setText("Button " + loopIndex);
		}

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