Pergunta

im having a problem that is cause i CAN edit the cell when not having focus but when i press the bind key in the cell ("Enter"), action is not performed.

don't execute

But when is has focus, action is performed correctly.

execute

I only want to add the keybinding for that specific cell (row,col) , so i added to the textfield in the render.

May be im doing something bad.

Foi útil?

Solução

As you tab from cell to cell focus in still on the table. The editor is only invoked when you double click with the mouse or use F2 with the keyboard. While the cell is being edited, the text field (which is the default editor) has focus.

If you start typing on a cell text is added to the cell but I believe the default behaviour is for focus to remain on the table. However, I think you can change the default by using the following when you create the table:

table.setSurrendersFocusOnKeystroke(true);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top