public void makeVisible(int index){
  if (index < 0 || index >= items.size()) {
    return;
  }
  if (isItemHidden(index)) {
    if (index < vsb.getValue()) {
      scrollVertical(index - vsb.getValue());
    }
 else     if (index > lastItemDisplayed()) {
      int val=index - lastItemDisplayed();
      scrollVertical(val);
    }
  }
}

public void makeVisible ( int index ) { if ( index < 0 || index >= items . size ( ) ) { return ; } if ( isItemHidden ( index ) ) { if ( index < vsb . getValue ( ) ) { scrollVertical ( index - vsb . getValue ( ) ) ; } else if ( index > lastItemDisplayed ( ) ) { int val = index - lastItemDisplayed ( ) ; scrollVertical ( val ) ; } } }
ensure that the given index is visible , scrolling the list if necessary , or doing nothing if the item is already visible . the list must be repainted for changes to be visible .
