I have JTable with 5 columns, the first column is noneditable others are editable.
If I am in the first column, I want RowsSelection to be ON for deletion,addition of rows at selected row, Otherwise if i am in other Columns it should work as cell selection true(both row and column selection to be Off)
I tried ListSelectionListener method but don't work as expected??
public void valueChanged(ListSelectionEvent e){
int col =table.getSelectedColumn()
SwingUtilties.invokeLater(new Runnable(){
public void run()
{
if(col==0) table.setRowSelectionAllowed(true);
else table.setRowSelectionAllowed(false);
}
});
}
[ August 20, 2004: Message edited by: Arun thoppegowda shivanna ]