I have added ListSelectionListener to the JList and have overidden the method valueChanged., when I change the value present in the list with the arrow keys the event is fired once but with mouse selection the event is fired twice. thanks in advance
You have to look at the return value of ListSelectionEvent.getValueIsAdjusting(). If you're going to get more than one event, all but the last of them will return "true"; the last one will return "false". It returns false for single events, too. Have your event handler only respond to "false" events.
[ August 11, 2003: Message edited by: Ernest Friedman-Hill ]