if (fixedCellHeight != -1) { if (fixedCellWidth != -1) { int size = getModel().getSize(); retVal = new Dimension(fixedCellWidth, size * fixedCellHeight); } }
prefHeight = getVisibleRowCount() * getCellBounds (getFirstVisibleIndex(), getFirstVisibleIndex()).height;
  public Dimension getPreferredScrollableViewportSize()  {    Dimension retVal = getPreferredSize();    if (getLayoutOrientation() == VERTICAL)      {        if (fixedCellHeight != -1)          {            if (fixedCellWidth != -1)          {                int size = getModel().getSize();                retVal = new Dimension(fixedCellWidth, size * fixedCellHeight);              } // TODO: add else clause (preferredSize is ok for now)          } // TODO: add else clause (preferredSize is ok for now)      }    return retVal;  }