title: How to print the console output to the JTextArea?
body: <p>Following is my java code : </p>
  
  <p>Can someone please suggest how to print the same on <code>JTextArea</code>?</p>
  
  <pre><code> DBCursor cursor = coll.find();
  
   int i=1;
   while (cursor.hasNext())
   {
      System.out.println("Inserted Document: "+i);
      System.out.println(cursor.next()); // i want to print this into jtextarea
      i++;
   }
  </code></pre>