I have a JList whose contents change dynamically.  Selecting an item
in the list causes some detailed information pertaining to the
selected item to be displayed elsewhere (lets call it DetailArea) in
the GUI.  This accomplished via a ListSelectionListener.  If no item
is selected in the JList, DetailArea should be empty.

I want that any changes in the contents of the JList will result in
(1) the clearing of the JList's selection and (2) the clearing of
DetailArea.  The first of these is easy, since it happens
automatically once I clear and repopulate the list model.

But DetailArea is not being cleared, and this is because the
ListSelectionListener's valueChanged() method is not being called
either when the contents of the ListModel are cleared or when the
selection is cleared (with the ListSelectionModel's
clearSelectionMethod()).

How can one programmatically force the ListSelectionModel to fire a
valueChanged event?

Thanks,

KJ

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

Reply via email to