return (viewsize);
Dimension dim = list[0].getPreferredSize();  if (dim.width <= 0 && dim.height <= 0) return viewsize;  int vScrollbarWidth = getVScrollbarWidth (); int hScrollbarHeight = getHScrollbarHeight ();  if (scrollbarDisplayPolicy == SCROLLBARS_ALWAYS) { viewsize.width -= vScrollbarWidth; viewsize.height -= hScrollbarHeight; return viewsize;
	public Dimension getViewportSize() {		Dimension viewsize = getSize();		Insets insets = getInsets();		viewsize.width = viewsize.width - (insets.left + insets.right);		viewsize.height = viewsize.height - (insets.top + insets.bottom);		ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable();		ScrollPaneAdjustable h = (ScrollPaneAdjustable) getHAdjustable();		if ((v != null) && v.isVisible())			viewsize.width = viewsize.width - v.getSize().width;		if ((h != null) && h.isVisible())			viewsize.height = viewsize.height - v.getSize().height;		return (viewsize);	}