title: Append Textarea result from another class
body: <p>I have two classes class <code>Game</code>  and class <code>wampusGUI</code>. In <code>wampusGUI</code> class I have one <code>textarea</code> named <code>displayTextArea</code> under the method <code>textarea1()</code>.
  I am trying to <code>append</code> result to <code>textarea</code> from <code>Game</code> class. but when I am trying to access from that class . the <code>function</code> running fine and also the result is coming in that class (I just tested by simply <code>System.out.print()</code>  method), but it is not appending to <code>textarea</code>. Here is my code.</p>
  
  <pre><code>// Code of wampusGUI  class
  public class wampusGUI extends javax.swing.JFrame {
  
      /**
       * Creates new form wampusGUI
       */
      public wampusGUI() {
          initComponents();
      }
  
      public void textArea1(String text) {
          System.out.print(text);
          displayTextArea.append(text); // this is not appending to textarea.
      }
  
             /* Create and display the form */
          java.awt.EventQueue.invokeLater(new Runnable() {
              public void run() {
  
                  new wampusGUI().setVisible(true);
                     Game g = new Game();
                     g.testing();
              }
          });
      }
  </code></pre>
  
  <p>//Here is the code of Game class</p>
  
  <pre><code>      private wampusGUI gui;
  
        public void testing () {         
            String welCome=welcome();
            gui= new wampusGUI();
            gui.textArea1(welCome);            
       }
  </code></pre>