title: JTextArea setText is not working
body: <p>I have a problem with setting text in JTextArea, I tried setText(which I'd prefer) and append also. I do not know where the problem is, I got client-server app. I want to put message that server sends in JTextField but I am unable to here is my code:</p>
  
  <p>client side code which is reciving the message properly:</p>
  
  <pre><code>try
      {
  
  
          Socket socket = new Socket("localhost", PORT);
          BufferedReader input = new BufferedReader( new InputStreamReader(System.in));
          DataOutputStream output = new DataOutputStream(socket.getOutputStream());
          BufferedReader serverInput = new BufferedReader(new InputStreamReader(socket.getInputStream()));
  
          output.writeBytes(outputString + "\n");
          inputString = serverInput.readLine(); // private String inputString
          mymodel.setTextArea(inputString); // this is not working
          System.out.println(inputString); // this is working
          socket.close();
  
      }
      catch...
  </code></pre>
  
  <p>setTextArea method:</p>
  
  <pre><code>public void setTextArea(String string)
  {
      MyPanel mypanel = new MyPanel();
      mypanel.textArea.setText(string); // debugger shows that the string contains message from server
  }
  </code></pre>
  
  <p>I have set textarea to public since setter method weren't working, actually this one isn't working also. I do not know where the problem is, and debugger isn't helping me either.</p>
  
  <p>Looking for your answers</p>
  
  <p>EDIT: </p>
  
  <p>JTextTable code:</p>
  
  <pre><code>textArea = new JTextArea(1, 30);
  textArea.setEditable(false);
  panel.add(textArea, c);
  </code></pre>