My JList has >100 values. when the screen is loaded the i have set the selected index of the list to 50 and added the JList to a JScrollPane. the value is getting selected but the JScrollPane is not getting adjusted to display that value. can anyone pleases tel me how to do that.
Share
list.ensureIndexIsVisible(list.getSelectedIndex());should be enough.