I don’t know how to insert a line of code that counts the numbers entered in a box that pops up. Basically I can’t enter more than 5 numbers. So I think some sort of if statement needs to be inputed, which I don’t know how to do.
Here is my code:
String number;
number = JOptionPane.showInputDialog("Enter Number");
JOptionPane.showMessageDialog(null,"The new result is" + number,"Results",
JOptionPane.PLAIN_MESSAGE);
System.exit(0);
Thanks
EDIT: a little shabby but how about something like this?