更新时间:2023-12-03 17:45:04
这是不清楚你得到的错误或你得到的错误;我怀疑错误转换为 Boolean
。作为一般指导,默认渲染器和编辑器 Boolean.class
是 JCheckbox
;你不应该明确地设置它。如此处所示,请确保您遵循以下原则让您的演员阵容成功:
It's not clear what error you get or where you get it; I suspect an error casting to Boolean
. As general guidance, the default renderer and editor for Boolean.class
is a JCheckbox
; you shouldn't have to set it explicitly. As shown here, ensure that you observe the following principles for your cast to succeed:
在 TableModel $ c $中插入
Boolean.class
类型的值c>。
Insert values of type Boolean.class
in your TableModel
.
从 getColumnClass()返回
Boolean.class
相关列的code>。
Return Boolean.class
from getColumnClass()
for the relevant column.
从 isCellEditable()
返回所需的值。