title: Fill JTable from database
body: <p>I write this simple code to fill <code>jTable1</code>, but it just fills <code>jTable1</code> with the last row from the database.</p>
  
  <pre><code>String SQL = "select * from usernames";
  ResultSet rs = stmt.executeQuery(SQL);
  String[] columnNames = {"Full Name", "Email"}; 
  String n = "",e = "";
  while(rs.next()) { 
      n = rs.getString("Full_Name");
      e = rs.getString("Email");
      Object[][]data = {{n,e}}; 
      jTable1 = new JTable(data, columnNames);
  
  }       
  </code></pre>