Skip to content

Instantly share code, notes, and snippets.

@irbull
Created August 24, 2012 15:37
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 irbull/3452083 to your computer and use it in GitHub Desktop.
Save irbull/3452083 to your computer and use it in GitHub Desktop.
Example of SWT Not working. Any idea what's wrong?
package com.example;
/*
* example snippet: Hello World
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
*/
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class Snippet1 {
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();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment