title: Using intercellSpacing in a JTable with a custom row background color causes unexpected results
body: <p>I have a JTable where I want to highlight some rows using a custom background-color. This I have done with the following class:</p>
  
  <pre><code>public class MyTable extends JTable {
  
      private List&lt;RefData&gt; data = null;
  
      public List&lt;RefData&gt; getData() {
          return data;
      }
  
      public void setData(List&lt;RefData&gt; data) {
          this.data = data;
      }
  
      @Override
      public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
          Component comp = super.prepareRenderer(renderer, row, column);
  
          if (this.data == null || row &lt; 0 || row &gt; this.data.size()-1){
              return comp;
          }
  
          RefData rowData = this.data.get(row);
          if (rowData.getStatus() &lt; 3000){
              comp.setBackground(Color.YELLOW);
          } else {
              comp.setBackground(Color.WHITE);
          }
  
          return comp;
      }
  
  }
  </code></pre>
  
  <p>All this works like a charm, and I get exactly what I want. Next, while looking at the resulting GUI, I realise that the table looks way too condensed. Everything looks squished together. As always with the default JTable settings ;)</p>
  
  <p>Well, that's easily solved I thought:</p>
  
  <pre><code>myTable.setIntercellSpacing(new java.awt.Dimension(10, 1));
  </code></pre>
  
  <p>Now, the cells are nicely spaced <strong>but</strong>, the added cell margins are now in the default table background color, which in my case is white. This looks butt-ugly.</p>
  
  <p>I assume that the intercell spacing adds spacing between the cell border and the component returned by prepareRenderer. This would explain the result. But how can I get it to change the background of the cell itself?</p>
  
  <p>Is my <code>prepareRenderer</code> solution is not suited for this task? Or is there another solution?</p>