首页 > 代码库 > SWT.Shell

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 }

 

SWT.Shell