How do I programmatically select JTables rows?
This program shows you how to select some rows in the JTable programmatically. Below we demonstrates how to select rows using the setRowSelectionInterval() method, remove or clear row selection using removeRowSelectionInterval() method and use the addRowSelectionInterval() to add more rows to the previously selected rows.