import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TextAreaApplet extends JApplet
{
	JPanel contentPanel;
	JTextArea textArea;
	JButton button;
	
	public void init()
	{
		contentPanel = (JPanel)getContentPane();
		contentPanel.setLayout(new FlowLayout());
		textArea = new JTextArea("A default value", 20, 40);
		textArea.setLineWrap(true);
		button = new JButton("Clear");
	
		// You know the drill-- action handling will
		// be covered in a following chapter
		button.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent evt)
			{
				doMyButtonAction();
			}
		});
	
		contentPanel.add(textArea);
		contentPanel.add(button);
	}
	public void doMyButtonAction()
	{
		// does nothing
	}
}
