Can someone please provide a sample code or at least a method that I can use to get the string values of multiple selections in a JTable? I searched the web, but I found only examples of how to get values from a single selection. Based on that I tried to implement the code myself using loops, but it blew up on my face. Any help will be greatly appreciated.
JTable has a method for that :
int[] selection = table.getSelectedRows();
Of course, this method returns the indices of the selected rows. You can use these indices to get the values you want from the the table model.