javax.swing.JTable table = dBTable1.getTable();
javax.swing.ListSelectionModel rowSM = table.getSelectionModel();
int lastSelectedRow = 0;
rowSM.addListSelectionListener(new javax.swing.event.ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
int currentSelectedRow = table.getSelectedRow();
if( currentSelectedRow == lastSelectedRow || currentSelectedRow == -1 )
return;
//the currently selected row is currentSelectedRow,
//now you can use dBTable1.getValueAt() and get the data in different columns of this row
lastSelectedRow = currentSelectedRow;
}
});