I have a JTable and I want to detect a single click and double click on a row. I recognize I need to create a mouseListener. However I have seen examples that extend a JTable and implement a mouseListener as part of the JTable definition, as well as create just a mouse listener and then simply addMouseListener to the JTable. What is the behavior difference and which is the preferred implementation if any? TIA.
Asked
Active
Viewed 39 times
0
-
1Create the MouseListener and add it to the table. – camickr Mar 25 '17 at 14:46
-
Thanks but what is the difference? – Wt Riker Mar 26 '17 at 18:00