String digits = "";
for (i = 0; i < NUMELS; i++) // Display and total the grades
{
digits += numbers[i];
}
JOptionPane.showMessageDialog(null, "numbers entered where: " + digits +
"\n" + "the sum of all numbers entered is: " +
total, "message",
JOptionPane.INFORMATION_MESSAGE);