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

import javax.swing.JButton;


/**
 * This class is a subclass of JButton.
 * It is made to make a PencilButton.
 *
 * @author baekj.
 *         Created Apr 7, 2008.
 */
public class PencilButton extends JButton implements ActionListener{
	private DrawingPanel bla;
	/**
	 * This constructor creates a button that will enable the user to use the 
	 * Pencil function in Paint.
	 *
	 * @param bla the instance of the panel for drawing. This is brought into 
	 * this class so that the changes in made in this class can affect the 
	 * drawing panel. 
	 */
	public PencilButton(DrawingPanel bla){
		super();
		this.bla = bla;
		this.setVisible(true);
	}

	public void actionPerformed(ActionEvent e) {
		this.bla.buttonRecChanger(2);
	}

}