Rectangle b = getLocalBounds(c); if (r == null) r = new Rectangle();
if (c == null) return null; r = c.getBounds(r);
  public static Rectangle calculateInnerArea(JComponent c, Rectangle r)  {    Rectangle b = getLocalBounds(c);    if (r == null)      r = new Rectangle();    Insets i = c.getInsets();    r.x = b.x + i.left;    r.width = b.width - i.left - i.right;    r.y = b.y + i.top;    r.height = b.height - i.top - i.bottom;    return r;  }