@Override
  public Dimension getPreferredSize() {
    Dimension baseSize = super.getPreferredSize();
    int height = Math.min(baseSize.height, TipUiSettings.getTipPanelMaxHeight());
    return new Dimension(getDefaultWidth(), height);
  }
@Override
  public Dimension getPreferredSize()