return getMeasurements(c).getMinimumSize();
Insets i = getBorderInsets(c); Dimension minSize = new Dimension(i.left + i.right, i.top + i.bottom); Font font = getFont(c); FontMetrics fm = c.getFontMetrics(font); int titleWidth = fm.stringWidth(getTitle()); switch (getTitlePosition()) { case ABOVE_TOP: case BELOW_BOTTOM: minSize.width = Math.max(minSize.width, titleWidth); break; case BELOW_TOP: case ABOVE_BOTTOM: case TOP: case BOTTOM: case DEFAULT_POSITION: default: minSize.width += titleWidth; } return minSize;
  public Dimension getMinimumSize(Component c)  {    return getMeasurements(c).getMinimumSize();  }