public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell(display);
Text helloWorldTest = new Text(shell, SWT.NONE);
helloWorldTest.setText("Hello World SWT");
helloWorldTest.pack();
shell.pack();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}












网友评论