Code example for JList

Methods: getPreferredScrollableViewportSize

0
        return combineSizes( list1_.getMinimumSize(),
                             list2_.getMinimumSize() );
    } 
 
    public Dimension getPreferredScrollableViewportSize() {
        return combineSizes( list1_.getPreferredScrollableViewportSize(),
                             list2_.getPreferredScrollableViewportSize() );
    } 
 
    public int getScrollableBlockIncrement( Rectangle visibleRect,
                                            int orientation, int direction ) {
        return list1_.getScrollableBlockIncrement( visibleRect, orientation,
                                                   direction );
    } 
 
    public boolean getScrollableTracksViewportHeight() { 
        Container parent = getParent();
        return parent instanceof JViewport
            && ((JViewport) parent).getHeight() > getPreferredSize().height;
    }