码迷,mamicode.com
首页 > 其他好文 > 详细

。?。

时间:2019-11-06 18:40:02      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:frame   rgs   add   button   ram   axis   static   boxlayout   out   

public class a{
JFrame f;
Box box;
JButton b1,b2,b3;
public a(){
f=new JFrame ();
box= Box. creatVerticalBox();
//box =new Box(BoxLayout.Y_AXIS);
b1=new JButton ("按钮1");
b2=new JButton ("按钮2");
b3=new JButton ("按钮3");
box.add(b1);
box.add(b2);
box.add(b3);
f.add(box);
f.setSize(200,200);
f.setVisible(true);
}
public static void main(String args[]) {
new a();
}
}

。?。

标签:frame   rgs   add   button   ram   axis   static   boxlayout   out   

原文地址:https://www.cnblogs.com/1786722420yang/p/11806873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!