且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java JTable TableCellRenderer与ImageIcon列

更新时间:2023-12-04 10:09:10

无需创建自定义渲染器. JTable allready支持包含Icon的列的默认渲染器.您需要做的就是重写您似乎正在执行的getColumnClass()方法.

There is no need to create a custom renderer. JTable allready supports a default renderer for columns containing an Icon. All you need to do is override the getColumnClass() method, which you appear to be doing.