我想在“总费用”
和“谢谢...”之间插入一行
这是我到目前为止所做的代码:
JOptionPane.showMessageDialog(null, "Total Charges : RM" + dollar.format(totalCharges) + "Thank you please come again");
我该怎么做? 谢谢您
最佳答案
使用 HTML 格式。像这样的东西应该有效:
JOptionPane.showMessageDialog(null,
"<html><body>Total Charges : RM"
+ dollar.format(totalCharges)
+ "<br>Thank you please come again");
关于java - 如何在Applet中插入一行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24839193/