SWT.Shell

 

 1 import org.eclipse.swt.widgets.Display;
 2 import org.eclipse.swt.widgets.Shell;
 3 
 4 public class SWT_Shell {
 5 
 6     public static void main(String[] args) {
 7 Display display = Display.getDefault();
 8 Shell shell  = new Shell();
 9 shell.setSize(800, 600);
10 shell.setText("SWT.Shell");
11 shell.setLayout(null);
12 
13 shell.open();
14 shell.layout();
15 while (!shell.isDisposed()) {
16     if (!display.readAndDispatch()) {
17         display.sleep();
18     }
19 }
20 
21     }
22 
23 }

 

posted @ 2017-07-06 08:45  千彧  阅读(310)  评论(0编辑  收藏  举报