title: Custom TableCellRenderer/TreeTableCellRenderer doesn't render Table cells
body: <p>I made this <code>CustomCellRenderer</code> class intended to be used in <code>JXTreeTable</code> and <code>JXTable</code> objects since I have many of these in my project. So this class implements <code>TreeCellRenderer</code> and <code>TableCellRenderer</code> interfaces:</p>
  
  <pre><code>public class CustomCellRenderer extends JLabel 
                                  implements TreeCellRenderer, TableCellRenderer {
  
      @Override
      public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
          setBackground(selected ? new Color(83,142,213) : Color.white);
          setForeground(selected ? Color.white : Color.black);
          //here is the icon setting code but it's irrelevant to my problem
          setText(value != null ? value.toString() : "&lt;null&gt;");
          return this;
      }
  
      @Override
      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
          setBackground(isSelected ? new Color(83,142,213) : Color.white);
          setForeground(isSelected ? Color.white : Color.black);
          setText(value != null ? value.toString() : "&lt;null&gt;");
          return this;
      }
  }
  </code></pre>
  
  <p>And here is the code where I set the renderer:</p>
  
  <pre><code>jXTreeTableConsumos.setDefaultRenderer(Object.class, new CustomCellRenderer());
  jXTreeTableConsumos.setTreeCellRenderer(new CustomCellRenderer());
  </code></pre>
  
  <p>I'm expecting background and foreground become blue and white respectively when a row is selected. However it only happens at Tree table cell (first column) while only foreground changes and background stills white in the other cells in the very same selected row: </p>
  
  <p><img src="https://i.stack.imgur.com/RrbJ6.jpg" alt="enter image description here"></p>
  
  <p>Could anybody please tell me why cells (that are not tree cells) don't change their background color?</p>