public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int rowIndex, int columnIndex) {
Component comp = configureDelegate(table, value, isSelected, hasFocus, rowIndex,
columnIndex);
if ((table instanceof JXTable) && (comp instanceof JComponent)) {
hackBorder((JComponent) comp);
SortOrder sortOrder = ((JXTable) table).getSortOrder(columnIndex);
if (sortOrder.isSorted()) {
iconBorder.setIcon(sortOrder.isAscending() ? upIcon : downIcon);
Border origBorder = ((JComponent) comp).getBorder();
Border border = new CompoundBorder(origBorder, iconBorder);
((JComponent) comp).setBorder(border);
}
}
adjustComponentOrientation(comp);
return comp;
}