Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

tab key selects cell for edit in JTable

843804Dec 16 2002 — edited Oct 21 2004
Hello,

I've seen extensive posts on this forum for this problem, but no solution yet.

I have a Jtable, with custom cellRenders and cellEditors. Some columns are editable, some are not.

What I want to do, is when someone tabs to an editable cell, that cell immediately goes into edit mode. This means, it acts as if someone double clicked on it, or tabbed then clicked on it. Basically, I want it to ACTUALLY go into edit mode.

Please do not respond by telling me how to make it look editable (highlighting, etc) and do not respond with mouseEvent solutions. Please do not respond by telling me to do table.editCellAt(row,col) because that does not kick in my custom editor, it uses the defaultCellEditor.

So basic question:
How to kick in editing when someone tabs to an editable cell?

If you need code examples, please request and I will post.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2004
Added on Dec 16 2002
8 comments
575 views