Java Jlist Scrollbar
In a JList with a scrollpane. I have assigned a default selection value. On click of a reset button I'm assigning the default value. It works fine for when there are less values. But when there are many values when I press reset the default value gets selected, but is not focused.开发者_如何学C I remain at the end of the scrollbar and not at the beginning where the scrollbar begins because the default value is the first value. Can anyone please help me with this.
JList.ensureIndexIsVisible(int index)
精彩评论