Hello All,
I am student just starting Java. I do need help with swing - GUI. I am creating 4 textfield that accepts input from 3 user and will display as a 2D Array in the text area. As well as calculate the average of one column from the input.
I have done some coding with the add button. Need help with the remaining part.
float breakFast= Float.parseFloat(jTextField1.getText());
float lunch = Float.parseFloat(jTextField2.getText());
float dinner = Float.parseFloat(jTextField3.getText());
float dessert = Float.parseFloat(jTextField4.getText());
jTextArea1.setText(String.format("Amount spent on breakfast: %3.2f\n",breakFast));
jTextArea1.append(String.format("Amount spent on lunch : %3.2f\n",lunch));
jTextArea1.append(String.format("Amount spent on dinner: %3.2f\n",dinner));
jTextArea1.append(String.format("Amount spent on dessert: %3.2f\n",dessert));