private Icon paintIcon(Graphics g, BIOSwitch c, boolean selected,
			int x_start, int x_end, int x_end2, int y_start, int y_end) {

		Icon ico = getIcon(
				(selected) ? c.getSelectedIcon() : c.getDisabledSelectedIcon(),
				c);

		if (ico == null) {
			return null;
		}

		String text = ((selected) ? c.getOnString() : c.getOffString());
		boolean isText = text != null && !text.isEmpty();

		int x;
		if (isText) {

			x = (selected) ? x_start : x_start - ico.getIconWidth();
			x += ((selected) ? 1 : -1) * FONT_BORDER_X * 0.5;
		} else {

			x = (int) ((selected) ? (x_start + x_end) * 0.5
					: (x_start + x_end2) * 0.5);
			x -= ico.getIconWidth() * 0.5;
		}

		ico.paintIcon(c, g, x,
				(int) ((y_start + y_end) * 0.5 - ico.getIconHeight() * 0.5));

		return ico;
	}