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.
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).
Thnx for the help!
I'm creating a JTextField like this:
JTextField item1 = new JTextField(10);
And here I tried to set text to it:
String setValue = item1.setText("text");
This doesn't work. Why?
About my edit: The full code is commented out, not deleted. --MightyPork