开发者

Java Jlist Scrollbar

开发者 https://www.devze.com 2023-03-02 22:50 出处:网络
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.

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消