super.setHorizontalAlignment(JLabel.RIGHT);
}
+ /**
+ * Adapts the default method to ensure that double values are formatted for
+ * display
+ */
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column)
{
- if (value == null)
- {
- return null;
- }
-
- value = formatter.format(value);
+ value = value == null ? "" : formatter.format(value);
return super.getTableCellRendererComponent(table, value, isSelected,
hasFocus, row, column);