<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    hengheng123456789

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      297 Posts :: 68 Stories :: 144 Comments :: 0 Trackbacks

    1、不同Componsit間的切換。
    ?static int pageNum = -1;

    ?public static void main (String [] args) {
    ??Display display = new Display ();
    ??Shell shell = new Shell (display);
    ??shell.setBounds (10, 10, 300, 200);
    ??// create the composite that the pages will share
    ??final Composite contentPanel = new Composite (shell, SWT.BORDER);
    ??contentPanel.setBounds (100, 10, 190, 90);
    ??final StackLayout layout = new StackLayout ();
    ??contentPanel.setLayout (layout);

    ??// create the first page's content
    ??Composite page0;
    ??page0 = new Composite (contentPanel, SWT.NONE);
    ??page0.setLayout (new RowLayout ());
    ??Label label = new Label (page0, SWT.NONE);
    ??label.setText ("Label on page 1");
    ??label.pack ();

    ??// create the second page's content?
    ??Composite page1;
    ??page1 = new Composite (contentPanel, SWT.NONE);
    ??page1.setLayout (new RowLayout ());
    ??Button button = new Button (page1, SWT.NONE);
    ??button.setText ("Button on page 2");
    ??button.pack ();

    ??// create the button that will switch between the pages
    ??Button pageButton = new Button (shell, SWT.PUSH);
    ??pageButton.setText ("Push");
    ??pageButton.setBounds (10, 10, 80, 25);
    ??pageButton.addListener (SWT.Selection, new Listener () {
    ???public void handleEvent (Event event) {
    ????pageNum = ++pageNum % 2;
    ????contentPanel.layout ();
    ???}
    ??});
    ??layout.topControl = page0;

    ??shell.open ();
    ??while (!shell.isDisposed ()) {
    ???if (!display.readAndDispatch ()) display.sleep ();
    ??}
    ??display.dispose ();
    ?}

    posted on 2006-11-07 17:14 哼哼 閱讀(2198) 評論(1)  編輯  收藏 所屬分類: SWT

    Feedback

    # re: SWT Stack布局(StackLayout 類) 2009-03-01 15:22 ssss
    你寫的代碼調試過嗎?這樣寫應該會出錯吧
    pageNum??  回復  更多評論
      

    主站蜘蛛池模板: 免费大片在线观看网站| 日韩免费观看的一级毛片| 久久99久久成人免费播放| 人妻巨大乳hd免费看| 免费污视频在线观看| 在线看片无码永久免费视频| 免费人成视频在线观看不卡| 美女视频黄频a免费大全视频| 性无码免费一区二区三区在线| 成人毛片免费在线观看| 亚洲精品国产精品乱码不卞| 久久综合亚洲色HEZYO社区| 亚洲AV无码一区二区三区人| 美女免费视频一区二区| 免费又黄又爽的视频| yellow视频免费看| 国产日产成人免费视频在线观看| 亚洲精品福利网泷泽萝拉| 中文字幕视频在线免费观看| 宅男666在线永久免费观看| 免费福利资源站在线视频| 免费无码成人AV片在线在线播放| 99久久精品国产亚洲| 中文字幕无码毛片免费看| 亚洲日本在线观看网址| 2019中文字幕在线电影免费| 久久久久久久亚洲精品| 亚洲AV性色在线观看| 国产92成人精品视频免费| 国产av天堂亚洲国产av天堂| gogo免费在线观看| 久久久久亚洲精品中文字幕| 午夜精品免费在线观看 | 久久永久免费人妻精品下载| 亚洲伊人久久精品影院| 美女羞羞喷液视频免费| 久久亚洲精品成人AV| 国产在线观看免费视频播放器| 久久久久国产精品免费免费不卡| 亚洲欧美日韩一区二区三区| 在线视频免费观看高清|