I have a JTable with several rows, and each row is represented through a dot in a scatter chart. What I have to do is when the selected point is selected on the scatter chart, I have to associate this selection with the selection of the corresponding row in JTable.
I have an integer that represents which line I should select.
What I tried is this:
JTable table = new JTable();
...
...
...
table.setRowSelectionInterval(index1,index2);
So the problem is that this method selects all rows in the given range [index1, index2]. I want to select, for example, lines 1,15,28,188, etc.
How do you do that?
source
share