title: Inserting Resultset into Arraylist and displaying them
body: <p>I have difficult storing multiple result sets into an ArrayList. Also I need to display them in a JTextArea. But the problem is, I can't get it to display anything.</p>
  
  <pre><code>public static ArrayList&lt;Wall&gt; getWallPosts(int postId){
  
      ArrayList&lt;Wall&gt; postList = new ArrayList&lt;Wall&gt;();
      ResultSet rs = null;
      DBController db = new DBController();
  
      db.setUp("myDatabase");
      String dbQuery = "SELECT Id FROM Wall WHERE ID ="+postId; 
  
      rs = db.readRequest(dbQuery);
  
      try{
         while (rs.next()){
              int wallId = rs.getInt("Id");
              String wallPoster = rs.getString("Poster");
              String wallPost = rs.getString("Post");
              String wallDate = rs.getString("Tdate");
              Wall w1 = new Wall(wallPoster, wallPost , wallDate);
              postList.add(w1);   
         }
      }
      catch (Exception e) {
         e.printStackTrace();
      }
  
  
      db.terminate();
      return postList;
  
  }
      //The method for displaying the result sets
          public void retrieveCategoryQuestionList() {
      //get the list and store in array
      ArrayList&lt;Wall&gt; aList = Wall.getWallPosts(id);
      for(id = 1; id&lt;aList.size();id++)
          jTextAreaWall.append(w2.getPost());
  }
  </code></pre>
  
  <p>The fields in the database is Id, Poster, Post, Tdate</p>