Last active
November 24, 2016 09:50
-
-
Save vogella/9c772bde631976f6c46e2f8a6f58fd0d to your computer and use it in GitHub Desktop.
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
import org.eclipse.swt.*; | |
import org.eclipse.swt.layout.*; | |
import org.eclipse.swt.widgets.*; | |
public class Main { | |
public static void main (String [] args) { | |
Display display = new Display (); | |
Shell shell = new Shell (display); | |
Button feedTheDog = new Button (shell, SWT.PUSH); | |
feedTheDog.setText("Feed the dog"); | |
shell.setLayout (new RowLayout ()); | |
shell.pack (); | |
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