• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set foucs to a cell of JTable

 
Roshani Agrawal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JTextField as Component of table cell editor for the table.I want to set foucs to cell if the value of cell is > 1 .User is not allowed to do other functionality until he enters right value and till then foucs should be on that cell only.
Please let me know if anyone has solution for it.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50277
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I don't think you can set the focus on anything, but most Swing classes have a method allowing them to request the focus. Have a look in the API.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic