Created
September 15, 2018 03:49
-
-
Save avojak/c019376e98b50e4406763121d18acf7d to your computer and use it in GitHub Desktop.
Basic test application for SWT
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
public class SWTTestApp { | |
private final Display display; | |
private final Shell shell; | |
public SWTTestApp() { | |
display = new Display(); | |
shell = new Shell(display); | |
shell.setLayout(new FillLayout()); | |
shell.setSize(new Point(400, 400)); | |
shell.setText("SWT Test App"); | |
} | |
public void run() { | |
shell.open(); | |
while (!shell.isDisposed()) { | |
if (!display.readAndDispatch()) { | |
display.sleep(); | |
} | |
} | |
display.dispose(); | |
} | |
public static void main(final String... args) { | |
new SWTTestApp().run(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment