title: Unable to get data into JTable
body: <p>I'm trying to get the data from a <code>JTextField</code> to a <code>JTable</code> when the button Add
  
  <p><code>ActionListener</code>:</p>
  
  <pre><code>public void actionPerformed(ActionEvent evt) {
      Object src = evt.getSource();
      if (src == AddBtn) {
          System.out.println("HELLOO");
          String nextRowId = Integer.toString(model.getRowCount());
          model.addRow(new Object[] { nextRowId, LatText.getText(),
                  LongText.getText(), EvlText.getText() });
  
      } else if (src == NextBtn) {
  
      } else if (src == perviousBtn) {
  
      }
  }
  </code></pre>
  
  <p>JTable: </p>
  
  <pre><code>String columns[] = { "ID", "Name", "Age", "Gender" };
  Object data[][] = { { "0", "Tom", new Integer(20), "Male" },
          { "1", "Tina", new Integer(18), "Female" },
          { "2", "Raj", new Integer(19), "Male" },
          { "3", "Tina", new Integer(18), "Female" },
          { "4", "Raj", new Integer(19), "Male" },
          { "5", "Tina", new Integer(18), "Female" }
  
  };
  DefaultTableModel model = new DefaultTableModel(data, columns);
  </code></pre>
  
  <p>Full code: <a href="http://pastebin.com/9R9QyXdw" rel="nofollow">http://pastebin.com/9R9QyXdw</a>?</p>
  
  <p>Nothing happens when Add is clicked.</p>
  
  <p>EDIT</p>
  
  <p>I've corrected it to this: </p>
  
  <pre><code> JTable dataTable = new JTable(model); 
  </code></pre>
  
  <p>but still no data gets added.
  Thank you. </p>