Problem:
"I am using a Jlist. To control the selected Item I am using a SelectionListener. But the method valueChanged(ListSelectionEvent) is allways called twice when I select an Item from the List."
Solution:
There are two events fired. One for a select and one for a deselect. Use this code to execute only if the Item is selected:
ListSelectionEvent e;
if(! e.getValueIsAdjusting())
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen