Skip to content

Instantly share code, notes, and snippets.

@avojak
Created September 15, 2018 03:49
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 avojak/c019376e98b50e4406763121d18acf7d to your computer and use it in GitHub Desktop.
Save avojak/c019376e98b50e4406763121d18acf7d to your computer and use it in GitHub Desktop.
Basic test application for SWT
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