2009年8月11日

tEST2

 

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class FirstSWT {
    
public static void main(String[] args) {
        Display display 
= new Display();
           Shell shell 
= new Shell(display);
           Label label 
= new Label(shell, SWT.CENTER);
           label.setText(
"Hello, World");
           label.setBounds(shell.getClientArea());
           shell.open();
           shell.setText(
"Hello World!");
           
while (!shell.isDisposed())
           
{
            
if (!display.readAndDispatch())
            
{
             display.sleep();
            }

           }

           display.dispose();
           
    }

}

posted @ 2009-08-11 00:16 爪哇岛骑士 阅读(100) | 评论 (0)编辑 收藏

<2009年8月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
303112345

导航

统计

常用链接

留言簿

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜