title: JAVA putting text in JTextfield
body: <p>i'm writing this program where eventually i'm going to get info from a multidimensional array into the JTextfields, the info will depend on what the user inputs in the "item2". My problem is I cannot get any kind of data from the "theHandler" class into the JTextfields. I try to use "setText" but it tells me it cannot change void to string. I could also use the value I get in theHandler class for "piezas" and use it on GUI, but I can't return the value from piezas to GUI. Not sure what to do here. I already have the array ready, I just need to get the values on the same class to write a switch so I can get the info in the JTextfields.</p>
  
  <p>So basically, I need to get the "piezas" value from thehandler class into the Gui class (or be able to input text in the JTextfields from thehandler class).</p>
  
  <p>Thnx for the help!</p>
  
  <hr>
  
  <p>I'm creating a JTextField like this:</p>
  
  <pre><code>JTextField item1 = new JTextField(10);
  </code></pre>
  
  <p>And here I tried to set text to it:</p>
  
  <pre><code>String setValue = item1.setText("text");
  </code></pre>
  
  <p>This doesn't work. Why?</p>
  
  <hr>
  
  <p><em>About my edit: The full code is commented out, not deleted.
  --MightyPork</em></p>