title: Getting values from another frame
body: <p>So I'm having these classes</p>
  
  <pre><code>public class Init {
      ...
      JFrame addStream = new AddStream();
      addStream.setVisible(true);
      addStream.setLocationRelativeTo(null);
      addStream.getData(); //not working
  
  }
  
  public class AddStream extends javax.swing.JFrame {
  
      private String nameData, urlData, qualityData;
  
      /** Creates new form AddStream */
      public AddStream() {
          initComponents();
      }
      private void initComponents() {
      ...
      }
  
      private void addActionPerformed(java.awt.event.ActionEvent evt) {
          nameData = name.getText();
          urlData = url.getText();
          qualityData = quality.getSelectedItem().toString();
      }
  
      public String[] getData() {
          return new String[]{nameData, urlData, qualityData};
      }
  }
  </code></pre>
  
  <p><em>Note the classes arent complete, just snippets.</em></p>
  
  <p>When the user clicks on the Add button(addActionPerformed) the values get saved to local variables in the AddStream class and get returned by getData().</p>
  
  <p>The problem I'm having is with addStream.getData();, I get "cannot find symbol"</p>
  
  <p>Is there a way to get that data from AddStream JFrame to Init class?</p>