东西南北中布局

package cn.rushangw.lesson01;

import java.awt.*;

public class TestBorderLayout {
public static void main(String[] args) {
Frame frame = new Frame("TestBorderLayout");
Button east = new Button("East");
Button west = new Button("West");
Button south = new Button("South");
Button north = new Button("north");
Button center = new Button("Center");

frame.add(east,BorderLayout.EAST);
frame.add(west,BorderLayout.WEST);
frame.add(south,BorderLayout.SOUTH);
frame.add(north,BorderLayout.NORTH);
frame.add(center,BorderLayout.CENTER);

frame.setSize(200,200);
frame.setVisible(true);
}
}
上一篇:2015 ACM/ICPC North America Qualifier J. Torn to Pieces (spfa最短路)


下一篇:龟兔赛跑