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())
Posts mit dem Label JList werden angezeigt. Alle Posts anzeigen
Posts mit dem Label JList werden angezeigt. Alle Posts anzeigen
Sonntag, 28. Januar 2007
Abonnieren
Posts (Atom)