JList and scrolling

I have a JList with a list of 10 items (random sequence of Strings).  I am looping through the list of items and if one of the items .equalsIgnoreCase("Test Item #9"), then I call addSelectionInterval(index, index) on the JList.  How can I then get the JList's scrollpane to scroll to that index so the selected item is visible in the list?
bjgAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
shaveriConnect With a Mentor Commented:
say setSelectedIndex(list.getItemCount()-1);
0
All Courses

From novice to tech pro — start learning today.