Component (JTable table, Object value, boolean selected, boolean focus, int row, int column) { super.getTableCellRendererComponent(table, value, selected, focus, row, column); //noinspection unchecked setIcon(value == null ? null : getIcon((T)value, table, row)); if (isCenterAlignment()) { setHorizontalAlignment(CENTER); setVerticalAlignment(CENTER); } return this; }