awt简单应用案例四-复选框checkbox

 awt简单应用案例四-复选框checkbox

java,零基

础不怕,不只要理论,更要实践+项目

<a href=http://www.bjweixin.com>太原维信科技提供 </a>

 

 

复选框

public class AwtTest {

//创建框架<a href=http://www.bjweixin.com>太原维信科技提供 </a>

public static void main(String[] args) {

Frame frame = new Frame("我的GUI");

frame.setLayout(null);<a href=http://www.bjweixin.com>太原维信科技提供 </a>

frame.setBounds(0,0, 300,400);

Checkbox ch1 = new Checkbox("系统管理员",true);

ch1.setBounds(100,100,140,20);

Checkbox ch2 = new Checkbox("系统管理员",true);

ch2.setBounds(100,140,140,20);<a href=http://www.bjweixin.com>太原维信科技提供 </a>

Checkbox ch3 = new Checkbox("系统管理员",true);

ch3.setBounds(100,180,140,20);

frame.add(ch1);

frame.add(ch2);

frame.add(ch3);

frame.setVisible(true);

}

}

 

 

posted @ 2013-07-30 14:29  微心  阅读(299)  评论(0编辑  收藏  举报