code: public void setVisibleRowCount(int visibleRowCount) {
          sourceList.setVisibleRowCount(visibleRowCount);
          chosenList.setVisibleRowCount(visibleRowCount);
          helperList.setVisibleRowCount(visibleRowCount);
  
          // Ok, since we've haven't set a preferred size on the helper scroller,
          // we can use it's current preferred size for our two control lists.
          Dimension d = helperScroller.getPreferredSize();
          chosenPanel.setPreferredSize(d);
          sourcePanel.setPreferredSize(d);
  
      }
docs: Sets the preferred number of rows in the list that can be displayed
  without a scrollbar.
  
  @param visibleRowCount an integer specifying the preferred number of
  visible rows