我想根据先前的值绘制股票报价的渲染:
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
Object o1 = table.getModel().getValueAt(row, column);
Object o2 = value;
}
基本上如果 o1 < o2 中的值,则绘制红色 如果 o1 > o2 中的值,则绘制绿色
但问题是 o1 和 o2 返回相同的值。如何获取渲染器中包含的先前值