Automatic scrolling of JScrollPane
here is the problem..
I creat a JList and add it to a JScrollPane.I set its vertical scroll bar policy to Always Visible. Then I add it to the CENTER of content pane of a JFrame.
Now i want to add new members to the list dynamically. the problem is when the list grows beyond the vertical size of the JFrame, the scroll pane does not automatically scroll down to display the newly added items. I have to manually scroll down to see the new members.
My question is what should I do to make the scroll bar automatically scroll down, so that I can see the most recent additions to the list.
Thanks in advance..:)