void (boolean down) { int currentIndex = myResultsList.getSelectedIndex(); int newIndex = myListModel.getIndexToScroll(currentIndex, down); if (newIndex != currentIndex) { myResultsList.setSelectedIndex(newIndex); ScrollingUtil.ensureIndexIsVisible(myResultsList, newIndex, 0); } }