Ken Miller wrote:

>I have a JList that I wrap with a JScrollPane and display it in a JPanel.
>The list is initially empty and added to the JScrollPane using the
>getViewPort().add() method.  The list is later updated with a Vector of
>names and it displays correctly.  The problem I have is that the scrollbar
>never appears the size it should and I can't use the scrollbar to scroll
>down the list.  I have 100 names in the list, with only 25 displayed at one
>time.  The scrollbar appears, but the slider takes up the whole scrollbar
>and won't let me scroll down.  If I click one of the names and then use the
>down arrow key to go down the list, I can go down the list, but the list in
>view doesn't change.
>
>Does anyone have any ideas why the JScrollPane would be behaving like this?
>
>Thanks in advance.
>
>Ken
>
Try this,
setListData(Object); then
paintImmediately(getVisibleRect());

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to