title: How to disable a particular cell in JTable?
body: <p>I am working with swing. I Have a <code>JTable</code> having 8 columns and Dynamic rows.
  2nd column is non-editable which I did like this in <code>DefaultTableModel</code>.</p>
  
  <pre><code>static JComboBox combo1 = new javax.swing.JComboBox(new String[]{"Static","Project Variable", "External", "Output Variable"});
              ParametersTable.setModel(new     javax.swing.table.DefaultTableModel(
              parametersTableData,
              new String[]{
                  "S.No", "Parameters", "Parameter Type", "Static Value", "Variable Name", "Sheet Name", "Column Name", "Output Variable"
              }
              ) { 
  Class[] types = new Class[]{
                      java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
                  };
  
                  public Class getColumnClass(int columnIndex) {
                      return types[columnIndex];
                  }
  
                  boolean[] canEdit = new boolean[]{
                      true, false, true, true, true, true, true, true 
                  };
  
                  public boolean isCellEditable(int rowIndex, int columnIndex) {
                      return canEdit[columnIndex];
                  }
              }       
              );
              ParametersTable.getColumnModel().getColumn(2).setCellEditor(new DefaultCellEditor(combo1));
  </code></pre>
  
  <p>I have a <code>JComboBox</code> in 3rd column which has values <code>static,project variable,external,output variable</code>.</p>
  
  <p>Assuming there are 2 Rows ,So when I select Parameter Type as <code>static</code> in first row, i want that particular <code>cell</code> (Static Value) to be enabled in that particular row and rest of the cells to be disabled.
  Similarly when I select Parameter Type as "Output Variable" in second row. I want that particular cell (Output Variable) to be enabled in that particular row and rest of the cells to be disabled.</p>