staticvoidBorderLayoutTest(){ Frame frame = new Frame("Label"); BorderLayout layout = new BorderLayout(10,15); Panel pannel = new Panel(layout); pannel.add(BorderLayout.NORTH, new Button("北方")); pannel.add(BorderLayout.SOUTH, new Button("南方")); pannel.add(BorderLayout.EAST, new Button("东方")); pannel.add(BorderLayout.WEST, new Button("西方")); pannel.add(BorderLayout.CENTER, new Button("中心")); frame.add(pannel); frame.pack(); frame.show(); }