可视化
作者:互联网
package keshi;
import java.awt.*;
public class new01 {
public static void main(String[] args) {
Frame f=new Frame("BorderLayout 布局");
f.setSize(400,300);
f.setLayout(new BorderLayout());
Button btn01=new Button("东");
Button btn02=new Button("西");
Button btn03=new Button("南");
Button btn04=new Button("北");
Button btn05=new Button("中");
f.add(btn01,BorderLayout.EAST);
f.add(btn02,BorderLayout.WEST);
f.add(btn03,BorderLayout.SOUTH);
f.add(btn04,BorderLayout.NORTH);
f.add(btn05,BorderLayout.CENTER);
f.setVisible(true);
}
}
标签:BorderLayout,Button,add,可视化,btn04,new,public 来源: https://www.cnblogs.com/huaobin/p/13543867.html