Skip to content

Instantly share code, notes, and snippets.

@vertis
Created January 31, 2011 11:17
Show Gist options
  • Select an option

  • Save vertis/803916 to your computer and use it in GitHub Desktop.

Select an option

Save vertis/803916 to your computer and use it in GitHub Desktop.
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class HelloWindows {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello, world!");
shell.open();
// Set up the event loop.
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
// If no more entries in the event queue
display.sleep();
}
}
display.dispose();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment