JTable right-click row selection
By default a left mouse click on a JTable row will select that row, but it’s not the same for the right mouse button. It takes bit more work to get a JTable to select a row based on right mouse clicks. You might be able to do it by subclassing JTable or ListSelectionModel, but there’s an easier way. 1. Use a MouseAdapter to …