tags:

views:

370

answers:

1

I have a JList, and a JButton, user can click an item in the JList or they can click the button, when the button is clicked how do I de-select (change the selected list item bgcolor to normal, in other words, nothing in the JList will be selected after the button is clicked) the item from the JList ?

+2  A: 

The JList should have a clearSelection() method that you can call.

Thomas Owens