Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (value != null) { myLabel.setText(((PsiType)value).getPresentableText()); myLabel.setBackground(isSelected ? table.getSelectionBackground() : table.getBackground()); myLabel.setForeground(isSelected ? table.getSelectionForeground() : table.getForeground()); if (isSelected) { myLabel.setSelectionIcon(); } else { myLabel.setRegularIcon(); } } return myLabel; }