ysTable = new CalendarTable(daysModel, calendar); daysTable.setCellSelectionEnabled(true); daysTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); daysTable.setDefaultRenderer(daysTable.getColumnClass(0), new TableCellRenderer() { ponent ponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { String text = (value == null) ? "": value.toString(); JLabel cell = new JLabel(text); cell.setOpaque(true); if (row == 0){ cell.setForeground(headerForeground); cell.setBackground(headerBackground); } else { if (isSelected) { cell.setForeground(selectedForeground); cell.setBackground(selectedBackground); } else { cell.setForeground(foreground); cell.setBackground(background); }} return cell; } }); updateView(); cPane.add(daysTable, BorderLayout.CENTER);