Created
August 24, 2012 15:37
-
-
Save irbull/3452083 to your computer and use it in GitHub Desktop.
Example of SWT Not working. Any idea what's wrong?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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