Access arraylist from another class
<p>I am a newbie to Java and I have a <strong>gui</strong> class which has a GUI component and it takes the input from the text field and should pass it to another class. The action listener of the button is below.</p>

<pre><code>public void actionPerformed(ActionEvent action) {               
  arraylist.add(textField_1.getText());
  arraylist.add(textField_2.getText());
  arraylist.add(textField_3.getText());
  arraylist.add(textField_4.getText());     
}
</code></pre>

<p>since it is a void method I cannot return the array list so that Ii cannot construct a getter.</p>

<pre><code>public ArrayList&lt;String&gt; getList(){
    return this.arraylist;
}
</code></pre>

<p>Could anyone please tell me how to access this arraylist from the another class without passing it through the constructor? I am sorry if i asked anything wrong. Thanks in advance.</p>