@Override
  public Dimension getPreferredSize() {
    if (getComponentCount() != 1 || super.getBorder() != null) {
      return super.getPreferredSize();
    }
    return getComponent(0).getPreferredSize();
  }
@Override
  public Dimension getPreferredSize()