I have a JList which is in a JScrollPane, on a JPanel, in a JTabbbedPane on a JFrame. The JList is called list_XSDStatusList, and the JScrollPane is called listScrollPane.
When processing starts, my UI (the JFrame) consecutively adds items to the list with no break between adding items. For example, it might add 100 items, then stops adding items.
The problem is that the items on the list are not visible until all the items have been added.
I'm using an instance of the DefaultListModel class to maintain the list of items. I've tried various techniques to make the list visible as items are being added, such as:
But none of this works.
Can anyone help?
Thanks.
When processing starts, my UI (the JFrame) consecutively adds items to the list with no break between adding items. For example, it might add 100 items, then stops adding items.
The problem is that the items on the list are not visible until all the items have been added.
I'm using an instance of the DefaultListModel class to maintain the list of items. I've tried various techniques to make the list visible as items are being added, such as:
Code:
int index = listModel.size() - 1;
list_XSDStatusList.ensureIndexIsVisible(index);
list_XSDStatusList.validate();
list_XSDStatusList.repaint();
listScrollPane.repaint();
But none of this works.
Can anyone help?
Thanks.