import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;


public class EinKnopf_ extends JFrame implements ActionListener{
  /**
	 * 
	 */
private static final long serialVersionUID = 1L;
/*private int count=0;
  private JButton jb= new JButton("Gedrückt: " + count);*/
  private JButton jb= new JButton("Nicht gedrueckt!");
  
  public EinKnopf_(){
    super("Knopf V2");
    jb.addActionListener(this);
    add(jb);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
        pack();
  }

  public void actionPerformed(ActionEvent ev){
    //jb.setText("Gedrückt: "+(++count));
    jb.setText("Gedrueckt");
  }
 
  public static void main(String args[]) {
      new EinKnopf_();
  }

}
