标签: java
我正在尝试右对齐数字,同时保持文本左对齐。
//Display the test average and grade JOptionPane.showMessageDialog(null, (String.format("Initial Cost: $%,.2f\nDiscount: $%,.2f\n" + "Final Cost: $%,.2f", initialCost, discount, finalCost)));
如何显示小数对齐的行?