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 on 2009-08-11 00:16 爪哇島騎士 閱讀(117) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 湄潭县| 南郑县| 河曲县| 赤水市| 木里| 扶沟县| 南雄市| 平潭县| 大关县| 新巴尔虎右旗| 中江县| 马公市| 高密市| 新竹县| 吐鲁番市| 蓬溪县| 永仁县| 泸西县| 亚东县| 凤庆县| 阿坝| 绥江县| 茌平县| 诏安县| 内乡县| 抚松县| 永年县| 同仁县| 安岳县| 哈尔滨市| 兰西县| 贵德县| 平武县| 柳河县| 丰原市| 岳阳县| 瓮安县| 乡宁县| 康马县| 安吉县| 瑞金市|