title: java need a child object to change data in the parent
body: <p>I'm sure I'm missing something obvious, but I'm fairly new to java. </p>
  
  <p>Anyway, I need the child object to update a variable in the parent in order to display progress information. </p>
  
  <pre><code>package XXX
  {
  
      class aaa
      {
          //has Main()    
          //instantiates an instance of bbb and runs it.    
          bbb myForm = new bbb();
          myForm.setVisible(true);
      }
  
  
      class bbb
      {
          public JTextField jProgressField = new JTextField();
          //builds a form with buttons that also shows jProgressField.
          //when you push the "go" button, it instantiates CCC object and tells it to do stuff
          ccc doStuff = new ccc();
          doStuff.goAndConquer();
      }
  
      class ccc
      {
          protected goAndConquery()
          { 
          //blah blah blah
          //processes a file
          //needs to update ccc with progress information that will still be there to be read when ccc.goAndConquer ends and goes out of scope
          }
      }
  }
  </code></pre>
  
  <p>All one package. </p>
  
  <p>Three classes in three files. </p>
  
  <p>The code works and stuff happens... but... I need to update the form (an instance of bbb) with data from ccc while the processing happens (a progress bar and running log of what has happened). 
  How do I send a stream of data back to the "parent" or calling instance / object? </p>
  
  <p>In essence, in ccc, I want to do this ( repeatedly, as it runs through the file being processed)</p>
  
  <pre><code>myParentWhoCreatedMeAndCalledMe.jProgressField = myParentWhoCreatedMeAndCalledMe.jProgressField + "next line of status information"; 
  </code></pre>