随笔 - 64  文章 - 9  trackbacks - 0
<2009年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

常用链接

留言簿(6)

我参与的团队

随笔分类(88)

随笔档案(92)

文章分类(142)

文章档案(182)

天基成员

学习园

我的海角

搜索

  •  

积分与排名

  • 积分 - 178606
  • 排名 - 320

最新评论

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-03-23 09:26 鹏凌 阅读(262) 评论(0)  编辑  收藏 所属分类: Windowsjava

只有注册用户登录后才能发表评论。


网站导航: