AutoRelease学习

2017-08-30  本文已影响0人  宇哥说
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 ();
}
上一篇 下一篇

猜你喜欢

热点阅读