import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class BasicEventApplet extends JApplet 
implements ActionListener
{
	JButton button = new JButton("I'm active!");
	JPanel contentPanel = (JPanel)this.getContentPane();
	public void init() 
	{
		// register this class as an ActionEvent listener
		button.addActionListener(this);
		// arrange components
		contentPanel.setLayout(new FlowLayout());
		contentPanel.add(button);
	}
	// this satisfies the ActionListener interface
	public void actionPerformed(ActionEvent e)
	{
		// just beep, for now
		Toolkit.getDefaultToolkit().beep();
	}
}
