title: Jtable tablecellrenderer?
body: <p>I have a java gui using dtable and I'm trying to highlight the last row added. In my GUI.java file, I have the dtable created using:</p>
  
  <pre><code>public JTable display = new JTable(model){
  public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
  {
      Component c = super.prepareRenderer(renderer, row, column);
  
      c.setBackground(Color.GREEN);
  
      return c;
  }
  </code></pre>
  
  <p>};</p>
  
  <p>In my main.java file, I create the gui class instance 'gu' with dtable instance 'display' and add rows using:</p>
  
  <pre><code>DefaultTableModel model = (DefaultTableModel) gu.display.getModel();
  model.addRow(new Object[] {"col1","col2"});
  </code></pre>
  
  <p>All I want to do is highlight the last added row using the renderer. What would be the code to invoke it?</p>