У меня проблемы с отображением строки msg3 в моей панели JOptionPane. При запуске я получаю ошибку «Строка не может быть преобразована в int». Если 3 разные строки разделены на свои собственные панели, программа будет работать, однако мне нужно, чтобы все они были в одной и той же. Спасибо за любой совет / помощь заранее.
//add all of the expenses together
double total = airfare1 + carRent1 + parking1 + reg1 + (lodge1 * numberOfDays1) + (meals * numberOfDays1);
String msg1;
msg1 = String.format("Total cost: $%,.2f\n Allowed expenses: $%,.2f\n", total);
//Calculate the allowable reinbusement
double allow = airfare1 + carRent1 + ( pfees * numberOfDays1) + reg1 + (lfees * numberOfDays1) + (meals * numberOfDays1);
String msg2;
msg2 = String.format("Allowed expenses: $%,.2f\n", allow);
//calculates the total amount to be paid back
double pback = total - allow;
String msg3;
msg3 = String.format("Amount to be paid back: $%,.2f\n", pback);
//display the totals using joptionpane
JOptionPane.showMessageDialog(null,msg1,msg2,msg3);