public void paint(Graphics g) {
		Dimension d = getSize();
		g.drawImage(icons, border, border, iconW + border, iconH + border, 0, iconIndex * iconH, iconW, (iconIndex + 1)
				* iconH, null);

		if (mouseOver && !mousePressed) {
			g.setColor(Color.orange);
		} else if (selected || mousePressed) {
			g.setColor(Color.red);
		} else {
			g.setColor(Color.black);
		}

		g.drawRect(0, 0, d.width - 1, d.height - 1);
	}