public static void moveTop(JList list){
  int[] indices;
  int diff;
  if (canMoveUp(list)) {
    indices=list.getSelectedIndices();
    diff=indices[0];
    moveItems(list,diff,MOVE_UP);
  }
}

public static void moveTop ( JList list ) { int [ ] indices ; int diff ; if ( canMoveUp ( list ) ) { indices = list . getSelectedIndices ( ) ; diff = indices [ 0 ] ; moveItems ( list , diff , MOVE_UP ) ; } }
moves the selected items to the top
