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

public class ButtonTestiSWF extends JFrame implements ActionListener
{
 private JButton B1,B2;
 private JTextArea cikti;

 public ButtonTestiSWF()
 {
 super("button örneği");
 Container c=getContentPane();
 c.setLayout(new FlowLayout());
 B1=new JButton("B1");
 B1.addActionListener(this);
 c.add(B1);
 B2=new JButton("B2");
 B2.addActionListener(this);
 c.add(B2);
 cikti=new JTextArea(" ");
 c.add(cikti);
 cikti.setBackground(c.getBackground());
 }

 public static void main(String[] args)
      {
      ButtonTestiSWF pencere= new ButtonTestiSWF();
      pencere.addWindowListener(new BasicWindowMonitor());
      pencere.setSize(350,200);
      pencere.setVisible(true);
      }

public void actionPerformed(ActionEvent e)
{
String gs =  " "+e.getActionCommand()+"düğmesine basildi\n"+
             " "+e.paramString()     +"düğmesine basildi";
cikti.setText(gs);
}



}



