title: How to apply Font color to specific cells on JTable that uses DefaultTableModel
body: <p>I'm trying to create a simple To-Do list Java application connected to MS Access and I used <strong>JTable</strong> and <strong>DefaultTableModel</strong> to display the list. I want to mark completed tasks by changing its color when I click on a button. I have a boolean field named '<em>completed</em>' that serves as indicator.</p>
  
  <pre><code>String header[] = {"priority", "task"};
  String data[][];
  DefaultTableModel model = new DefaultTableModel(data, header);
  JTable table = new JTable(model);
  
  // to be replaced with code that affects only specific cells not the whole table
  table.setFont(customFont);
  </code></pre>
  
  <p>I already have a Font object that I called <em>customFont</em>, which is ready to be applied. My question is, how do I apply it only to specific cells where completed==true.</p>
  
  <p>Sample codes would be much appreciated.</p>