@Override
        public Dimension getPreferredSize() {
          Dimension preferredSize = super.getPreferredSize();
          Dimension preferredViewportSize = ((Scrollable)contextComponent).getPreferredScrollableViewportSize();
          if (!isPreferredSizeSet() && preferredViewportSize == null) {
            setPreferredSize(new Dimension(0, preferredSize.height));
          }
          return preferredSize;
        }
@Override
        public Dimension getPreferredSize()