title: Swing: TableCellRenderer that uses boldface for some of the cells
body: <p>Simple question, but I can't seem to find the answer anywhere online.</p>
  
  <p><strong>How do you use a custom TableCellRenderer to render some of the table cells in boldface?</strong></p>
  
  <p>I know how to use TableCellRenderer to set the background color on a cell-by-cell basis. You do something like:</p>
  
  <pre><code>  public class MyTableCellRenderer extends DefaultTableCellRenderer 
    {
      @Override public Component getTableCellRendererComponent(JTable table,
         Object value, boolean isSelected, boolean hasFocus, int row, int column)
      {
          Component c = super.getTableCellRendererComponent(table, value,
            isSelected, hasFocus, row, column);
          // modify the component "c" to have whatever attributes you like
          // for this particular cell
      }
    }
  </code></pre>
  
  <p>I would assume changing the rendering text style is similar, but how do you set the font to be the same as the default table font but in boldface?</p>