title: unable to add row into jTable in java
body: <p>I'am trying to access data from database and showing it in jTable on clicking a button. but my table shows nothing on pressing button. i have gone through all adding row into table questions in stackOverflow but nothing helped me. here i'am pasting my button's actionListener- </p>
  
  <pre><code>private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
      // TODO add your handling code here:
      java.util.Date utildate = jDateChooser1.getDate();
      java.sql.Date date = new java.sql.Date(utildate.getTime());
      //System.out.println(date);
  
      String dbURL = "jdbc:derby://localhost:1527/contact;user=nbuser;password=nbuser";
      Connection conn = null;
      Statement stmt = null;
      try
      {
          Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();;
          //Get a connection
          conn = DriverManager.getConnection(dbURL); 
          stmt = conn.createStatement();
          //System.out.println(id);
          ResultSet result = stmt.executeQuery("select ID, NAME from EMPLOYEE ORDER BY ID "); 
          ArrayList&lt;String&gt; id = new ArrayList&lt;String&gt;();
          ArrayList&lt;String&gt; name = new ArrayList&lt;String&gt;();
          Map&lt;String, String&gt; present = new HashMap&lt;String, String&gt;();
          while(result.next()){
          id.add(result.getString("id"));
          name.add(result.getString("name"));
          present.put(result.getString("id"), "A");
          }
          result = stmt.executeQuery("select ID from ATTENDANCE where DATE = '" + date +"'");
          while(result.next()){
              present.replace(result.getString("id"), "P");
          }
          DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
          model.setColumnIdentifiers(new String[] { "Id", "Name","Attendance"});
          for(int i = 0; i &lt; id.size(); i++){
              System.out.println(id.get(i)+" "+ name.get(i)+ " "+ present.get(id.get(i)));
              model.addRow(new String[]{id.get(i), name.get(i), present.get(id.get(i))});
              model.fireTableRowsInserted(1, i+1);
          }
          jTable1.setModel(model);
      }
      catch (Exception except)
      {
          except.printStackTrace();
      }
  }
  </code></pre>
  
  <p>please tell me where i'am doing wrong?</p>