if (b.hasFocus() && b.isFocusPainted()) { Color saved_color = g.getColor(); g.setColor(focusColor); Rectangle focusRect = ir.union(tr); g.drawRect(focusRect.x, focusRect.y, focusRect.width, focusRect.height); g.setColor(saved_color); }
  protected void paintFocus(Graphics g, AbstractButton b, Rectangle vr,                            Rectangle tr, Rectangle ir)  {    if (b.hasFocus() && b.isFocusPainted())      {        Color saved_color = g.getColor();        g.setColor(focusColor);        Rectangle focusRect = ir.union(tr);        g.drawRect(focusRect.x, focusRect.y,                   focusRect.width, focusRect.height);        g.setColor(saved_color);      }  }