import com.e2one.example; public class OpenShell{ public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.open(); // 开始事件处理循环,直到用户关闭窗口 while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }