Skip to content

Instantly share code, notes, and snippets.

@noqisofon
Created March 3, 2012 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noqisofon/1966335 to your computer and use it in GitHub Desktop.
Save noqisofon/1966335 to your computer and use it in GitHub Desktop.
SWT で窓を出すだけのそれ。
import org.eclipse.swt.widgets.*;
public class WindowSample1 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell( display );
shell.setText( "Window Sample1" );
shell.setSize( 300, 200 );
shell.open();
while ( !shell.isDisposed() ) {
if ( !display.readAndDispatch() ) {
display.sleep();
}
}
display.dispose();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment