美文网首页
AutoRelease学习

AutoRelease学习

作者: 宇哥说 | 来源:发表于2017-08-30 09:59 被阅读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 ();
}

相关文章

网友评论

      本文标题:AutoRelease学习

      本文链接:https://www.haomeiwen.com/subject/ctuzdxtx.html