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

No comments:

Post a Comment

How to Use Google Lens on Android: Practical Everyday Use Cases

Google Lens is built into most Android phones already, but most people only use it for the occasional plant or object identification. It act...