title: customizing jtable cellrenderer with table's cell header color
body: <p>That's a question really similar to this <a href="https://stackoverflow.com/questions/6571877/jtable-tablecellrenderer-background-with-nimbuslookandfeel-color-problem">previous post</a> of mine.
  I need to customize some cell of a JTable, in a way that they would look like a table header cell.
  I'm using Nimbus look and feel and I'm trying to retrieve the color of JTable's editor:</p>
  
  <pre><code>public class HeaderCellRenderer extends JLabel implements TableCellRenderer{
  
  
      @Override
      public Component getTableCellRendererComponent(JTable table, Object value,
              boolean isSelected, boolean hasFocus, int row, int column) {
  
          System.out.println("OK");
          this.setOpaque(true);
          setBackground(UIManager.getColor("TableHeader.background"));
          return this;
      }
  
  }
  </code></pre>
  
  <p>I follow this <a href="https://stackoverflow.com/questions/730649/swing-uimanager-getcolor-keys">post</a> to get the name to be supplied to getColor  method ("TableHeader.background").
  Despite what I've done since now, the color returned isn't the same of my table's header cells.</p>
  
  <p>Do you have any idea?</p>
  
  <p>EDIT:</p>
  
  <p>I noticed that instead of a color it should be a gradient but I can't find the right key to use. I looked <a href="http://nadeausoftware.com/node/85#TableHeader" rel="nofollow noreferrer">this list</a>.</p>