I'm newbie and am having a problem. I created a gui with netbeans design view that contains 30 JTextFields. Then arrainged these textfields into 3 columns of 10 textfields each. So the idea is to have the user to be able to enter numbers into 2 of the columns of textfields then multiply corresponding rows of the first 2 columns and the result to be shown in the third column of textfields. So far I have
float a1 = Float.parseFloat(text1.getText()) //This 30 times one for each field
float [] cola;
cola = newfloat[10] //I did this 3 times to create 3 columns
cola[0] = a1 // I did this to place the variables in the columns
cola[1] = a2 // cola and colb for retrieved from user and colc for results
and this continues creating 3 columns... Then I multiply them together like so...
result = (colla*colb);
colc.setText(String.valueOf(result));
BUT this doesn't work. My desired result is to have the 10 textfields I arrainged into 'colc' to be the product of user input from the 2 columns of textfields. I think I am approaching this problem all wrong or maybe just a line of code is missing? Any help would be much appreciated!