Create a new ArrayList in Netbeans
<p>I'm new to programming in <code>Netbeans</code>, so keep it as simple as possible, please. </p>

<p>So, right now I have 3 java files in the same project: mainframe.java, edit.java and add.java. </p>

<p>In the mainframe-window you have 2 buttons which get you to the edit and add-window. In the add-window you get to enter a text in a text field and then press a button to add it into an <code>ArrayList</code>, I did this:</p>

<pre><code>public static void main(String args[]) {

    List&lt;String&gt; Hey = new ArrayList&lt;String&gt;();
}
</code></pre>

<p>And the Button:</p>

<pre><code>private void btnFortsattActionPerformed(java.awt.event.ActionEvent evt) 

{ 
    //The variable name of the text field is "txfCreate"

    String text = txfCreate.getText();
    Hey.add(text);  //The problem here is that Netbeans cannot find "Hey" symbol 

} 
</code></pre>

<p>Next, in the edit-window, I have a <code>JList</code> to show the content of the <code>ArrayList</code>. I have no idea know how to code it:(</p>