@Override
    public Dimension getPreferredSize() {
      if (myUseDefaultPreferredSize) {
        return myPreferredContentSize;
      }
      return super.getPreferredSize();
    }
@Override
    public Dimension getPreferredSize()