/*
* 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 ();
}
}
|