public java.awt.Component | getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int col)
// be a little paranoid about where the user tries to use this renderer
if (value instanceof Number) {
if (((Number)value).doubleValue() > threshold) {
setIcon(bang);
}
else {
setIcon(null);
}
}
else {
setIcon(null);
}
return super.getTableCellRendererComponent(table, value, isSelected,
hasFocus, row, col);
|