private void _drawRect(Graphics2D g2, int x, int w, Color hiCol,
			Color mdCol, Color loCol) {
		Dimension d = getSize();

		// Divide height into quarters
		int h = (int) d.getHeight();
		int th = h / 4;
		GradientPaint p1;
		GradientPaint p2;
		ButtonModel model = getModel();
		// Paint shaded area
		if (!model.isEnabled()) {
			p1 = new GradientPaint(0, 0, new Color(192, 192, 192), 0, th,
					new Color(192, 192, 192));
			p2 = new GradientPaint(0, 4, new Color(192, 192, 192), 0, h - th
					- 4, new Color(192, 192, 192));
		} else {
			if (model.isRollover()) {
				p1 = new GradientPaint(0, 0, new Color(255, 143, 89), 0, th,
						selectedHigh);
				p2 = new GradientPaint(0, 4, selectedHigh, 0, h - th - 4,
						new Color(255, 143, 89));
			} else {
				p1 = new GradientPaint(0, 0, loCol, 0, th, hiCol);
				p2 = new GradientPaint(0, 4, hiCol, 0, h - th - 4, loCol);
			}
		}
		g2.setPaint(p1);
		g2.fillRoundRect(1, 1, w - 2, th, 6, 6);
		g2.setPaint(p2);
		g2.fillRect(1, th, w - 2, h - th - 1);
		if (model.isPressed()) {
			p1 = new GradientPaint(0, 0, selectedLow, 0, th, selectedHigh);
			p2 = new GradientPaint(0, 4, selectedHigh, 0, h - th - 4,
					selectedLow);
			g2.setPaint(p1);
			g2.fillRoundRect(1, 1, w - 2, th, 6, 6);
			g2.setPaint(p2);
			g2.fillRect(1, th, w - 2, h - th - 1);

		}
	    g2.fillRect(1,th,w-2,h-th-1);
	}