How to remove a JList element from my program

I have JList and JButton, the user can click an item in a JList or click a button when a button is clicked, how can I cancel the selection (change the selected bgcolor list item to normal, in other words, nothing in JList will be selected after the button is clicked) element from Jlist

+4
source share
1 answer

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

+11
source

All Articles