Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想更改DefaultCellEditorjTable 中的属性,以便可以在编辑模式下自定义单元格的字体类型、大小、颜色、背景颜色等。
DefaultCellEditor
table.setDefaultEditor(Object.class, customEditor)
您可以设置自己的单元格编辑器,该编辑器可能源自DefaultCellEditor. 利用
table.getColumnModel().getColumn(column).setCellEditor(myEditor);
将您的编辑器设置到表格中。