@Override
  public Dimension getPreferredSize(JComponent c) {
    return getSizeWithButton(super.getMinimumSize(c), editor != null ? editor.getPreferredSize() : null);
  }
@Override
  public Dimension getPreferredSize(JComponent c)