Re: Forcing a JList to refresh one cell



Paul Tomblin wrote:
I have a JList where each item in the list is rendered by a
ListCellRenderer.  Among other things, the ListCellRenderer shows a
JProgressBar that is updated by an outside event.  The item itself has an
observer to notice that it has been updated, but other than calling
repaint on the whole JList, I can't seem to make it repaint the cell that
changed.

Look in
javax.swing.AbstractListModel
and its method
protected void fireContentsChanged(Object, int, int)

Practically you'll need to create your own model extends AbstractListModel if you don't have one.

.