import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

 public class JSplitPaneTestiSWF_2000 extends JFrame implements ActionListener
 {
 private JButton B[];
 private String S[]={"Düğme 1","Düğme 2","Düğme 3","Düğme 4"};
 private Container c;
 JSplitPane jsp[];

 public JSplitPaneTestiSWF_2000()
 {
 super("JSplitPane formatlama Grafik ara yüz (GUI) testi");
 c=getContentPane();
 c.setLayout(new BorderLayout(5,5));
 B=new JButton[4];
 jsp=new JSplitPane[3];
 for(int i=0;i<B.length;i++)
 {
 B[i]=new JButton(S[i]);
 B[i].addActionListener(this);
 }
 jsp[0]=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,B[0],B[1]);
 jsp[1]=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,B[2],B[3]);
 jsp[2]=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,jsp[0],jsp[1]);
 c.add(jsp[2]);
 }

 public void actionPerformed(ActionEvent e)
 {
 for(int i=0;i<B.length;i++)
 {
 if(e.getSource()==B[i])
 B[i].setText(S[i]+" düğmeye basıldı");
 else B[i].setText(S[i]);
 }
 c.validate();
 }
      public static void main(String[] args)
      {
      JSplitPaneTestiSWF_2000 pencere= new JSplitPaneTestiSWF_2000();
      pencere.addWindowListener(new BasicWindowMonitor());
      pencere.setSize(400,200);
      pencere.setVisible(true);
      }
 }

