Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does JTable always trigger ListSelectionListener twice?

Is it normal that any changes to the selected row of the JTable will trigger the added ListSelectionListener twice?

Is it possible that the ListSelectionListener can be triggered only once?

like image 801
Cyril Horad Avatar asked May 03 '11 05:05

Cyril Horad


1 Answers

Look at the event that is passed to your listener, specifically

ListSelectionEvent.getValueIsAdjusting() 

perform whatever ops you want to do when this returns false.

like image 173
MeBigFatGuy Avatar answered Oct 12 '22 13:10

MeBigFatGuy