Dimension d = new Dimension(min_w, min_h);  Dimension a = p.getViewport().getPreferredSize();  if (a != null) { d.width = Math.max(d.width, a.width); d.height = Math.max(d.height, a.height); }   System.out.println("BasicScrollPaneUI->preff->"+d); return d;
ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout(); return sl.preferredLayoutSize(c);
    public Dimension getPreferredSize(JComponent c)     {	JScrollPane p = (JScrollPane ) c;		Dimension d = new Dimension(min_w,				    min_h);		Dimension a = p.getViewport().getPreferredSize();	if (a != null)	    {		d.width = Math.max(d.width, a.width);		d.height = Math.max(d.height, a.height);	    }			   	System.out.println("BasicScrollPaneUI->preff->"+d);	return d;    }