FileDocCategorySizeDatePackage
Ch07_01.javaAPI DocExample916Mon Nov 17 12:59:40 GMT 2003org.eclipsebook.ch07

Ch07_01.java

/*
 * Created on Nov 17, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
 
package org.eclipsebook.ch07;

import org.eclipse.swt.widgets.*;
import org.eclipse.swt.*;

/**
 * @author Steven Holzner
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class Ch07_01 {

	public static void main (String [] args) {
	   Display display = new Display ();
	   Shell shell = new Shell (display);
	   shell.setSize(300, 200);
	   Label label = new Label (shell, SWT.CENTER);
	   label.setText ("No worries!");
	   label.setBounds (shell.getClientArea ());
	   shell.open ();
	   while (!shell.isDisposed ()) {
		  if (!display.readAndDispatch ()) display.sleep ();
	   }
	   display.dispose ();
	}
}