Skip to content

Instantly share code, notes, and snippets.

@sergioceron
Created June 2, 2013 19:41
Show Gist options
  • Save sergioceron/5694671 to your computer and use it in GitHub Desktop.
Save sergioceron/5694671 to your computer and use it in GitHub Desktop.
Detect double click on a JTable Cell
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