我为自动完整文字字段创建了一个Class
。
我想使用Class
并尝试包含我的JTable
单元格字段,但不会显示。
请咨询
答案 0 :(得分:3)
答案 1 :(得分:3)
(假设我理解这个问题)
您需要将编辑器包装在TableCellEditor中。看看Using Other Editors示例。
设置好后,需要在表格中注册编辑器。
一种方法是通过TableColumnModel
向相关列注册编辑器table.getColumnModel().getColumn(indexToColumnInQuestion).setCellEditor(tableCellAutoCompleteEditor);