FlowLayout
来源:互联网 发布:购物车源码 编辑:程序博客网 时间:2024/05/21 08:01
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cn.tsp2c.gui.event;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
*
* @author Administrator
*/
public class FlowLayoutTest {
public static void main(String args[]){
FlowFrame ff = new FlowFrame();
ff.setVisible(true);
}
}
class FlowFrame extends JFrame{
public FlowFrame(){
setSize(400,300);
setTitle("流布局显示");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//添加panel
FlowPanel fp = new FlowPanel();
add(fp);
}
}
class FlowPanel extends JPanel{
public FlowPanel(){
//边框布局
BorderLayout b1 = new BorderLayout();
setLayout(b1);
JButton btn1 = new JButton("土豆");
JButton btn2 = new JButton("地瓜");
JButton btn3 = new JButton("白薯");
JButton btn4 = new JButton("红薯");
JButton btn5 = new JButton("山药");
add(btn1,BorderLayout.NORTH);
add(btn2,BorderLayout.WEST);
add(btn3,BorderLayout.EAST);
add(btn4,BorderLayout.SOUTH);
add(btn5,BorderLayout.CENTER);
}
}
- FlowLayout
- FlowLayout
- FlowLayout
- FlowLayout
- FlowLayout
- FlowLayout
- FlowLayout
- FlowLayout布局
- FlowLayout 救助
- flex4 flowLayout
- FlowLayout布局
- Android FlowLayout
- UICollectionView-Flowlayout
- FlowLayout布局
- collectionView - flowLayout
- FlowLayout实现
- Qt FlowLayout
- 关于FLowLayout
- 变换主题
- 9针串行口的针脚功能
- Calculator
- ASP.NET常用路径获取方法与格式对照表
- MyEclipse设置JVM突破内存限制
- FlowLayout
- JAVA中的隐藏和覆盖
- 模块独立(2)
- Struts多模块
- 写个看看
- 我们不要放弃对方好不好 。
- C# aspx页面动态加载ascx用户控件 及 利用反射调用
- 企业建站
- 过来看看