Created
June 2, 2013 19:41
-
-
Save sergioceron/5694671 to your computer and use it in GitHub Desktop.
Detect double click on a JTable Cell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (e.getClickCount() == 2) { | |
JTable target = (JTable) e.getSource(); | |
int row = target.getSelectedRow(); | |
Object value = target.getModel().getValueAt(row, 0); | |
for (ItemListener il : listeners) { | |
il.onItemDoubleClick(this, value, row); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment