Java - passing values through frames
<p>I need to ask a small question because its irritating me.</p>

<p>How do i pass one vale from one frame to another frame in Java?</p>

<p>Below i have written a small script that is supposed to return the value but i dont quite know how to access it in the other frame.</p>

<p>Here is the code that is suppose to return the current value in a JcomboBox as a string into the other frame:</p>

<pre><code>public String getUser(String user)

{

 user = (String)jComboBox1.getSelectedItem().toString();

return user;

}
</code></pre>

<p>The way i thought it would work is to call a new instance of that class into the other frame (the classes name is editUser) so here is what i thought i would need to do.</p>

<pre><code>public editPass() 

{

initComponents();

editUser name = new editUser();

String test = name.getUser();

}
</code></pre>

<p>Thanks in advance for any advice.</p>
