title: Making a default value in a first row
body: <p><img src="https://i.stack.imgur.com/Cu1bJ.png" alt="enter image description here"></p>
  
  <p>I have this code that add row depends on the user input, but now I want the first row of the second column to have a default value of 0 and the rest of it is null.</p>
  
  <p>Code of the table </p>
  
  <pre><code>DefaultTableModel dm = new DefaultTableModel();
  
   table.setModel(dm);
  
  
              dm.addColumn("PROCESS");
              dm.addColumn("CPU Time");
              dm.addColumn("Arrival Time");
  
  
   try{
          int ps = Integer.parseInt(textField.getText());
  
  
  
          for(int x=0; x&lt;ps; x++){
              dm.addRow(new Object[]{x});
          }
          }catch(Exception e){
              e.printStackTrace();
          }   
      }
  </code></pre>