This content has been marked as final. Show 3 replies
893973 wrote:Well done, you can read stack traces, and I'm not being sarcastic here.
It seems to me anyway that the Integer.parseInt(jTextField_NumberOfTables.getText()); is not working
It also tells you why it fails, although it may not be so obvious. The input String is "3 ", which is 3 and a space. That's not strictly speaking a number, so you need to use trim() for example to remove excess whitespace.
int numTables = Integer.parseInt(jTextField_NumberOfTables.getText().trim());
int numCalc = Integer.parseInt(jTextField_NumberOfCalculations.getText().trim());
Because JTextBox you wrote 3 and space so method tries parse "3 " string . so give this exception . Overall , look trim method of String class.