Hi,
My application uses a JSplitPane in which the top and bottom components
are JScrollPane. The bottom scrollpane contains a JList. My list changes
depending on the user's actions so I have to use setListData, which must
be followed by repaint(), otherwise the data wouldn't change.

e.g.
myList.setListData(arrayOfStrings);
myList.repaint();

My problem is when I use setListData & repaint for the first time (i.e.
the list was empty, hence no scrollbar initially), the scroll bars do
not appear automatically. But once I click on the divider of the
splitpane, they appeared. I tried to call repaint on the scrollpane and
splitpane as well, but that didn't change anything.

Does anyone have a suggestion?
Thanks in advance.

Trieu Dang
[EMAIL PROTECTED]

(Since I'm not subscribed to the mailing list, it'd be nice if you could
send your reply to my email address. Thanks in advance.)

Reply via email to