JList SetSelectedIndex doesn't scroll to index's position
Hi.
My program simulates a microprocessor and it has memory locations and a list of instructions. As the user clicks the button to execute the next instruction, I have it so the next instruction to be executed is highlighted using JList's setSelectedIndex(index) method. Unfortunately, this simply highlights the line in the list that is at the index. Since my lists can be very large, it's cumbersome to have to scroll down to find the highlighted instruction or memory location. Is there a way to have the scroll pane move according to the location of the selected item?
Thanks!

