if (b.hasFocus() && b.isFocusPainted() && b.isEnabled())
if (b.hasFocus() && b.isFocusPainted() && m.isEnabled())
  public void paint(Graphics g, JComponent c)  {    AbstractButton b = (AbstractButton) c;    Rectangle tr = new Rectangle();    Rectangle ir = new Rectangle();    Rectangle vr = new Rectangle();    Font f = c.getFont();    g.setFont(f);    Icon currentIcon = null;    if (b.isSelected() && b.isEnabled())      currentIcon = b.getSelectedIcon();    else if (!b.isSelected() && b.isEnabled())      currentIcon = b.getIcon();    else if (b.isSelected() && !b.isEnabled())      currentIcon = b.getDisabledSelectedIcon();    else // (!b.isSelected() && !b.isEnabled())      currentIcon = b.getDisabledIcon();    SwingUtilities.calculateInnerArea(b, vr);    String text = SwingUtilities.layoutCompoundLabel      (c, g.getFontMetrics(f), b.getText(), currentIcon,       b.getVerticalAlignment(), b.getHorizontalAlignment(),       b.getVerticalTextPosition(), b.getHorizontalTextPosition(),       vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset);        if (currentIcon != null)      {        currentIcon.paintIcon(c, g, ir.x, ir.y);      }    if (text != null)      paintText(g, b, tr, text);    // TODO: Figure out what is the size parameter?    if (b.hasFocus() && b.isFocusPainted() && b.isEnabled())    paintFocus(g, tr, null);  }