I know it is already solved, but for future reference:
When adding mathamatics in Strings, it is not necessary to add empty strings between the calculations. In the this code:
JOptionPane.showMessageDialog(null, (x1-48) +"-" +(x2-48) +"" +(x3-48) +"" +(x4-48) +"-" +(x5-48) +"" +(x6-48) +"" +(x7-48) +"" +(x8-48) +"" +(x9-48) +"-" +c);
you have added "" between your calculations. When building the String, JAVA will perform all the calculations in the parentheses and then convert it to a String value (effectively). Without those parentheses, JAVA will simply take the numbers as String values.
For example:
This:
System.out.println("Value: "+5+9);
Will print out
Value: 59.
While this:
System.out.println("Value: "+(5+9));
Will print out
Value: 14.
So, instead of the code you have above, you can simply say:
JOptionPane.showMessageDialog(null, (x1-48) +"-" +(x2-48) +(x3-48) +(x4-48) +"-" +(x5-48) +(x6-48) +(x7-48) +(x8-48) +(x9-48) +"-" +c);