我找错地方了。
而不是使用
ListCellRenderer
我把桌上的东西伸出来,骑了过去。
createCell
方法。
public class CustomTable extends Table{
public CustomTable(TableModel model) {
super(model);
}
protected Component createCell(Object value, int row, int column, boolean editable) {
switch (column) {
case QUANITY_COLUMN:
// create custom cell and return
...
default:
return super.createCell(value, row, column, editable);
}
}
}