I managed to search but did not get the answer I wanted. Please allow me writing here.
Let's say I have a Swing JTable, each row has an ID (also other data). I know I can find out the row with a given ID, by implementing a function in tableModel. My question is, if I have an ID, how can I set the row to 'selected' status in JTable? it should be equivalent to 'using mouse to single click on that row'.
It looks there is not a method like 'setRowToSelected(int rowIndex)' in JTable?