• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Cell Focus

 
Udaya Bascar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Have a JTable initially with
one Row and Two Columns
if i Press enter on the 2nd column
the focus is not
at (1,0) but the focus is at(1,1)
when adding each and every Row
the focus is at ( nextRow,2ndColumn)
but i want it at (nextRow,1stColumn)
i tried with editCellAt(nextRow,0)
i want to have the focus inside JTable Cell
Focus under my control
any help will be very handy
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried to explicitely set the selection to this cell, or to set the focus to this cell respectively (with requestFocus())?
it might even help if you do this focus changing inside SwingUtilities.invokeLater.
cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!