1  import java.applet.Applet;
  2  import java.awt.*;
  3  
  4  public class BorderLayout3 extends Applet {
  5    Button EastButton, SouthButton, CenterButton;
  6  
  7    public void init() {
  8      // instantiating the button objects
  9      EastButton = new Button("East");
 10      SouthButton = new Button("South");
 11      CenterButton = new Button("Center");
 12  
 13      // setting layout to BorderLayout with NO horizontal and vertical spacing
 14      setLayout(new BorderLayout());
 15      
 16      // order is not important here as we are specifying the positions
 17      add("East", EastButton);
 18      add("South", SouthButton);
 19      add("Center", CenterButton);
 20    }
 21  }