Reputation: 67
I would like to insert one line between "total charges"
and "Thank you..."
Here is the code I have made so far:
JOptionPane.showMessageDialog(null, "Total Charges : RM" + dollar.format(totalCharges) + "Thank you please come again");
How can I do this? Thank You
Upvotes: 0
Views: 35
Reputation: 168825
Use HTML formatting. Something like this should work:
JOptionPane.showMessageDialog(null,
"<html><body>Total Charges : RM"
+ dollar.format(totalCharges)
+ "<br>Thank you please come again");
Upvotes: 2