dcsimg
How can I know which was the last row clicked on in a JTable?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   D_B
Posted On:   Friday, June 7, 2002 08:19 AM

I need to know which row the user last clicked on -- where he/she selected the row or unselected it. How can I do that?


My JTable allows multiple interval selection, so I cannot simply search for the first or last selected row.


If the last action was to select a row, I need to know which row that was.


If the last action was to unselect a row, I just need to know that it was an unselection (although getting the actual row index would be fine too).


How can I do this? Many thanks!

Re: How can I know which was the last row clicked on in a JTable?

Posted By:   Samir_Randive  
Posted On:   Saturday, June 8, 2002 10:48 AM

Try to get this by adding a ListSelectionListener to the ListSelectionModel for the table.




cheers...


Samir
About | Sitemap | Contact