public void drawIcon(final Graphics g)
  {
    final int width  = getSize().width;
    final int height = getSize().height;

    if(
      (width < (2 * (1 + getBorderX())))
      || (height < (2 * (1 + getBorderY()))))
    {
      return;
    }

    Color c = g.getColor();

    switch(getBorderType())
    {
      case RAISED_BORDER :
      {
        g.setColor(getBackground());
        g.fill3DRect(0, 0, width - 1, height - 1, !isSelected);

        break;
      }
      case SIMPLE_BORDER :
      {
        g.setColor(getBackground());
        g.fillRect(0, 0, width, height);
        g.setColor(getForeground());
        g.drawRect(0, 0, width - 1, height - 1);
        g.setColor(getBackground());

        break;
      }
      default :
      {
        g.setColor(getBackground());
        g.fillRect(0, 0, width, height);

        break;
      }
    }

    int xOffset = getBorderX();

    if(image != null)
    {
      if(isEnabled())
      {
        drawImage(g, image, xOffset);
      }
      else
      {
        if(gray == null)
        {
          gray =
            createImage(
              new FilteredImageSource(
                image.getSource(),
                new GrayFilter()));
        }

        drawImage(g, gray, xOffset);
      }

      xOffset += (getImageWidthScaled() + getBorderX());
    }

    final String label = getLabel();

    if(label != null)
    {
      Color fgColor = getForeground();

      if(!isEnabled())
      {
//        final int gray =
//          ((fgColor.getRed() * 77) + (fgColor.getGreen() * 59)
//          + (fgColor.getBlue() * 11)) >> 8;
//        fgColor = new Color(gray, gray, gray, fgColor.getAlpha() / 2);
        fgColor = fgColor.darker();
      }

      g.setColor(fgColor);

      final Font f = g.getFont();
      g.setFont(getFont());
      g.drawBytes(
        label.getBytes(),
        0,
        label.getBytes().length,
        xOffset,
        height - 1 - getBorderY());
      g.setFont(f);
    }

    g.setColor(c);
  }