隨筆 - 64  文章 - 9  trackbacks - 0
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(6)

          我參與的團隊

          隨筆分類(88)

          隨筆檔案(92)

          文章分類(142)

          文章檔案(182)

          天基成員

          學習園

          我的海角

          搜索

          •  

          積分與排名

          • 積分 - 184345
          • 排名 - 317

          最新評論

          import java.awt.*;
          import java.awt.event.*;
          class Test{
           public static void main(String [] args){
            Frame f=new Frame("變換");
            CardLayout c1=new CardLayout();
            f.setLayout(c1);
            Button b []=new Button[4];
            for(int i=0;i<4;i++){
             b[i]=new Button("第"+i+"頁");
             f.add(b[i],"page"+i);
            }
            b[0].setBackground(Color.red);
            b[1].setBackground(Color.blue);
            b[2].setBackground(Color.cyan);
            b[3].setBackground(Color.green);
            f.pack();
            f.setVisible(true);
            while(true){
             try{
              Thread.sleep(50);
             }
             catch (InterruptedException e){
              e.printStackTrace();
             }
             c1.next(f);
            }
           }
          }
          posted on 2009-09-24 11:08 鵬凌 閱讀(978) 評論(0)  編輯  收藏 所屬分類: Java --j2ee
          主站蜘蛛池模板: 五河县| 江孜县| 长沙市| 故城县| 广元市| 民权县| 塔城市| 平江县| 肥乡县| 凤台县| 荔浦县| 西安市| 宁波市| 东阿县| 洛宁县| 四会市| 贵阳市| 海口市| 广河县| 田阳县| 九寨沟县| 雅安市| 金川县| 新津县| 石首市| 闽清县| 河间市| 广南县| 高密市| 阿城市| 文成县| 唐山市| 新泰市| 金平| 三门县| 广元市| 七台河市| 靖西县| 大渡口区| 福海县| 澎湖县|