tags:

views:

17

answers:

2

Hi,

I am using Jgoodies binding to bind the table with my data. What listener i should implement so that when a cell is selected the values in a panel are changed.

My model class of table extends AbstractTableAdapter which is an Jgoodies binding class.

thanks

+1  A: 

The ListSelectionModel in your JTable (or suitable subclass) is what triggers events when the rows in a table are selected. You can implement ListSelectionListener and grab the selection model from the JTable and add yourself as a listener.

akf
A: 

i was able to do it as follows

myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

        public void valueChanged(ListSelectionEvent e) {
        System.out.println("hi");

        }
    });
harshit