Please help me to allow my `JTable` to search the

2019-05-29 01:39发布

If user starts pressing keys using keyboards then JTable is supposed to be searched the matching text for him and if user double clicks on cell then Table should allow him to edit the text.

And the issue is - Table is only searching text when the table is in non-editable mode and if Table is editable and user starts typing the text-using keyboard, cell is allowing him to edit the cell rather then search. Mr mKorbel has just solved my issue to allow edit only if double click on Table cell.

Please help me to allow my JTable to search the text even the table is in editable mode on key-press.

1条回答
Explosion°爆炸
2楼-- · 2019-05-29 02:15

Try this:

table.putClientProperty("JTable.autoStartsEdit", Boolean.FALSE);
查看更多
登录 后发表回答