How can my program know when a user has selected another row in a JTable?

Anjum Khan

A very good program example is given at Java tutorial (http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#selection)

Just remember, because of MVC you don't write code for the JTable event but for ListSelectionModel of the table.

To further understand there is another FAQ entry within jGuru FAQs, showing how select a row in a table: http://www.jguru.com/jguru/faq/view.jsp?EID=11760