aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 40052
    
  28
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://aspose.com/file-tools
 
subject: How to set foucs to a cell of JTable