import java.awt.*; public class VindueMedBorderLayout extends Frame { Button button1 = new Button(); Button button2 = new Button(); Button button3 = new Button(); Button button4 = new Button(); Button button5 = new Button(); BorderLayout borderLayout1 = new BorderLayout(); public VindueMedBorderLayout() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { button1.setLabel("NORTH"); button2.setLabel("SOUTH"); button3.setLabel("EAST"); button4.setLabel("WEST"); button5.setLabel("CENTER"); this.setLayout(borderLayout1); this.add(button1, BorderLayout.NORTH); this.add(button2, BorderLayout.SOUTH); this.add(button3, BorderLayout.EAST); this.add(button4, BorderLayout.WEST); this.add(button5, BorderLayout.CENTER); } }