Created
January 31, 2011 11:17
-
-
Save vertis/803916 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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