import java.applet.Applet;

 import java.awt.*;

 import java.awt.event.*;

 public class BorderLayoutTesti extends Applet implements ActionListener

 {

 private Button B[];

 private String S[]={"Kuzeyi Gizle","Guneyi Gizle","Doguyu Gizle",

 "Batiyi Gizle","Ortayi Gizle"};

 public void init()

 {

 setLayout(new BorderLayout(5,5));

 B=new Button[5];

 for(int i=0;i<B.length;i++)

 {

 B[i]=new Button(S[i]);

 B[i].addActionListener(this);

 }

 add(B[0],BorderLayout.NORTH);

 add(B[1],BorderLayout.SOUTH);

 add(B[2],BorderLayout.EAST);

 add(B[3],BorderLayout.WEST);

 add(B[4],BorderLayout.CENTER);

 }

 public void actionPerformed(ActionEvent e)

 {

 for(int i=0;i<B.length;i++)

 {

 if(e.getSource()==B[i])

 B[i].setVisible(false);

 else B[i].setVisible(true);

 }

 validate();

 }

 }

