This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to set foucs to a cell of JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "How to set foucs to a cell of JTable" Watch "How to set foucs to a cell of JTable" New topic
Author

How to set foucs to a cell of JTable

Roshani Agrawal
Greenhorn

Joined: Jun 23, 2006
Posts: 1
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

Joined: Oct 13, 2005
Posts: 32654
    
    4
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to set foucs to a cell of JTable
 
Similar Threads
How to force a value set from cell editor to table?
Accented characters in XLS with Apache POI HSSF
form validation
how to check value of cell in JTable
JTable row selection