Skip to content

Instantly share code, notes, and snippets.

@choiseungho
Created November 25, 2015 07:44
Show Gist options
  • Save choiseungho/f0559bd65c27e01c36dc to your computer and use it in GitHub Desktop.
Save choiseungho/f0559bd65c27e01c36dc to your computer and use it in GitHub Desktop.
Prevent Calling Twice ValueChanged Method From Table
tableView.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()){
System.out.println(tableView.getValueAt(tableView.getSelectedRow(), 0).toString());
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment