int lastItemDisplayed(){
  int n=itemsInWindow();
  return (Math.min(items.size() - 1,(vsb.getValue() + n) - 1));
}

int lastItemDisplayed ( ) { int n = itemsInWindow ( ) ; return ( Math . min ( items . size ( ) - 1 , ( vsb . getValue ( ) + n ) - 1 ) ) ; }
returns index of last item displayed in the list
