问题
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:
Try this:
table.putClientProperty("JTable.autoStartsEdit", Boolean.FALSE);
来源:https://stackoverflow.com/questions/9975339/please-help-me-to-allow-my-jtable-to-search-the-text-even-the-table-is-in-edit