title: Using custom TableModel make isCellEditable true for a particular row on button click
body: <p><img src="https://i.stack.imgur.com/YHeBc.png" alt="MY Table" /></p>
  <p>I have a table like above. Initially all the cells except button column are not editable. I have created the table using custom <code>TableModel</code>. My <code>isCellEditable</code> in custom <code>TableModel</code> looks like this:</p>
  <pre><code>public boolean isCellEditable(int rowIndex, int columnIndex) { 
      //System.out.println(&quot;isCellEditable: &quot; + rowIndex + &quot; &quot; + columnIndex);
      if(getColumnClass(columnIndex) == JButton.class)
          return true;
      else
          return false;
  }
  </code></pre>
  <p>But when I click on the Edit button of each row a <code>JDialog</code> will pop up with that row (by constructing a <code>JTable</code> in this dialog with only one row.) I can update the cell values in this JDialog's table. and then update them in the respective cells of that row.</p>
  <p><img src="https://i.stack.imgur.com/rN5nz.png" alt="JDialog's Table" /></p>
  <p>I successfully updated the main table's row after updating here, only if my <strong><code>isCellEditable</code> return true</strong>. But this should not happen. Only when I click then I should be able to change <code>isCellEditable</code> of the row as Editable and update and then make it uneditable.</p>
  <p>I have seen the following <a href="https://stackoverflow.com/questions/1042144/only-one-row-editable-on-jtable">post</a> but was unable to implement it.</p>