code: private void updateHeader() {
          gradientPanel.setBackground(getHeaderBackground());
          gradientPanel.setOpaque(isSelected());
          titleLabel.setForeground(getTextForeground(isSelected()));
          headerPanel.repaint();
      }
docs: Updates the header.