· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Eclipse/SWT

import org.eclipse.swt.widgets.*;

public class HelloSwtWindow
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		Display display = new Display();
		
		Shell shell = new Shell(display);
		
		shell.setText("Hello SWT");
		shell.setSize(400, 300);
		
		shell.open();
		
		while ( !shell.isDisposed() )
		{
			if ( !display.readAndDispatch() )
			{
				display.sleep();
			}
		}
		
		display.dispose();
	}

}

ID
Password
Join
You will step on the soil of many countries.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-09-20 11:08:02
Processing time 0.0025 sec