title: JTable set specific cells not editable?
body: <p>I would like to set some cells not editable in my JTable. I also searched for some solutions <a href="https://stackoverflow.com/questions/12776021/how-to-make-jtable-cell-editable-noneditable-dynamically">like this one</a>, but I don't get it working...</p>
  
  <p>This is my code so far:</p>
  
  <pre><code>public void cellEditableForum(JTable tempTable){
          DefaultTableModel tempTableModel = (DefaultTableModel) tempTable.getModel();
          int rows = tempTableModel.getRowCount();
          int columns = tempTableModel.getColumnCount();
  
          for (int i = 0; i &lt; rows; i++) {
              for (int j = 0; j &lt; columns; j++) {
                  if (j == 0 || j == 5) {
                      //TODO: Make cell not editable!
                      tempTableModel.fireTableCellUpdated(i, j);
                      System.out.println("Row: " + i + " Cell: " + j + tempTableModel.isCellEditable(i, j));
                  }
              }
          }
      }
  </code></pre>
  
  <p>And no, I CANNOT override the <code>isCellEditable()</code> function because I want to set only a few and selected cells not editable for different tables. Thats the reason, why I have created a function and the if check!</p>
  
  <p>Can somebody help me please?</p>