public void updateViewportPreferredSizeIfNeeded() {
    if (isPopupHeightStatic()) {
      getViewport().setPreferredSize(myList.getPreferredSize());
    }
  }
public void updateViewportPreferredSizeIfNeeded()