RSS

Search Engine

Friday, June 11, 2010

Labels and Texts

Create a new Java project "de.vogella.swt.simple" with the swt.jar in the classpath. Create the following class.

   
package de.vogella.swt.first;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class FirstSWTApplication {

public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell(display);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}

0 comments:

Post a Comment