/*
 * Wersja Swing.
 */

import javax.swing.JApplet;
import javax.swing.JButton;

import java.awt.Toolkit;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Button extends JApplet 
                    implements ActionListener {
    JButton button;
	static int count = 0;
    public void init() {
        button = new JButton("Kliknij mnie");
        getContentPane().add(button, BorderLayout.CENTER);
        button.addActionListener(this);
    }

    public void actionPerformed(ActionEvent e) {
        button.setText("Ponownie: " + count++);
    }
}
