Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seungdols/9f4040099ddd3f68d78e to your computer and use it in GitHub Desktop.
Save seungdols/9f4040099ddd3f68d78e 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