title: cannot find symbol error message
body: <p>While writing my program I got "cannot find symbol message" when I tried to invoke the method setTextArea() from another class. After compiling the program I am getting the following error message: 
  Uncompilable source code - Erroneous sym type: gui.setTextArea</p>
  
  <p>Here is my code: </p>
  
  <pre><code>public class LinkExtractor {
  
      public static void main(String[] args) throws IOException {
          //Validate.isTrue(args.length == 1, "usage: supply url to fetch");
          String base = "http://uk.ask.com/web?q=";
          String keyword ="flowers";
          String tale="&amp;search=&amp;qsrc=0&amp;o=312&amp;l=dir";
          String url =base+keyword+tale;
  
          print("Fetching %s...", url);
  
          Document doc = Jsoup.connect(url).get();
          Elements links = doc.select("a[href]");
  
          print("\nLinks: (%d)", links.size());
          for (Element link : links) {
              print(" * a: &lt;%s&gt;  (%s)", link.attr("abs:href"), trim(link.text(), 35));
        AssistantGUI gui=new AssistantGUI();
  
          }
      }
  
      public static void print(String msg, Object... args) {
        ***//here is the problem line***
          gui.setTextArea(String.format(msg, args));
  
      }
  
      private static String trim(String s, int width) {
          if (s.length() &gt; width)
              return s.substring(0, width-1) + ".";
          else
              return s;
      }
  }
  </code></pre>
  
  <p>And here is my second class:</p>
  
  <pre><code>import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.JTextArea;
  
  public class AssistantGUI {
  JFrame frame= new JFrame("TextArea frame");
  JPanel panel=new JPanel();
  JTextArea text= new JTextArea("",5,20);
  
  
  public AssistantGUI(){
  
  frame.add(panel);
  panel.add(text);
  frame.setSize(250,200);
  frame.setVisible(true);
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
  }
  public void setTextArea(String myString){
  text.append(myString);
  }
  public static void main(String[] args){
  AssistantGUI gui= new AssistantGUI();
  
  gui.setTextArea("Hello");
  }
  
  }
  </code></pre>
  
  <p>I read many posts with a similar issue, but couldn't find a solution. Everything looks fine to me. I am creating an instance of AssistantGUI and then I am using it to call the method setTextArea(), why it does not recognise it? Any ideas? I will really appreciate your help.</p>