public void componentResized(ComponentEvent e){
  JScrollBar bar=getVerticalScrollBar();
  int incr=(int)(getSize().getHeight() - (bar.getUnitIncrement(1) * 3));
  getVerticalScrollBar().setBlockIncrement(incr);
}

public void componentResized ( ComponentEvent e ) { JScrollBar bar = getVerticalScrollBar ( ) ; int incr = ( int ) ( getSize ( ) . getHeight ( ) - ( bar . getUnitIncrement ( 1 ) * 3 ) ) ; getVerticalScrollBar ( ) . setBlockIncrement ( incr ) ; }
invoked when the component ' s size changes . reset scrollable increment , because page - down / up is relative to current view size .
