@Override
	public void actionPerformed(ActionEvent e)
	{
		JComboBox cb = (JComboBox) e.getSource();
		String tool = (String) cb.getSelectedItem();

		switch (tool)
		{
		case "Pencil":
			canvas.setDrawListener(new PencilDrawListener(canvas)); // draws with a "pencil"
			break;
		case "Rectangle":
			canvas.setDrawListener(new RectangleDrawListener(canvas)); // draws rectangles
			break;
		case "RectFill":
			canvas.setDrawListener(new RectFillDrawListener(canvas)); // draws filled rectangles
			break;
		case "Circle":
			canvas.setDrawListener(new CircleDrawListener(canvas)); // draws circles
			break;
		case "CircleFill":
			canvas.setDrawListener(new CircleFillDrawListener(canvas)); // draws filled circles
			break;
		case "Line":
			canvas.setDrawListener(new LineDrawListener(canvas)); // draws straight lines
			break;
		case "BucketFill":
			canvas.setDrawListener(new BucketFillDrawListener(canvas)); // uses bucket to fill color area
			break;
		}
	}