• Post Reply Bookmark Topic Watch Topic
  • New Topic

Focus on a JTable cell  RSS feed

 
paritosh pandey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JTable in which I am adding rows dynamically.If I add 3 rows and populate data in 2nd and 3rd row only,then when I am trying to save data a dialog box pops up for entering data in 1st row.But when i click ok tab I have to click on that column to edit.Is there a way so that when I click OK the cursor itself comes to that desired column in which I have to edit?
I mean when I click "ok" on error dialog box cursor should be placed where the error has to be rectified.???
 
Rob Spoor
Sheriff
Posts: 21052
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTable has two methods called editCellAt; both take the row and column numbers, one also takes an EventObject.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!