tags:

views:

198

answers:

2

In JTable, if you are inserting values to that row of 4 in first column, Then the focus goes to first row and second column by default. I want to focus the next column of the same row( ie., row 4). How to set requestFocus() in JTable by row wise.?

A: 
table.changeSelection(...);
camickr
A: 

We should used the following method for setting a requestFocus in JTable.ie.,

table.isCellSelected(rowPosition, colPosition);

Then the cursor position goes to automatically in specified location.

Venkats