-1
使用Java,如何在對話框中顯示以下「格式化代碼」?如何使用printf和對話框格式化輸出?
System.out.printf("%20s%20s%20.-5f%n%n", "Assessed Value:", "$", assessedValue);
System.out.printf("%20s%20s%-5f%n%n", "Taxable Amount:", "$", taxedAmount);
System.out.printf("%20s%20s%-5f%n%n", "Tax Rate for $100.00:", "$", taxDollars);
System.out.printf("%20s%20s%-5f%n%n", "Property Tax:", "$", propertyTax);
太感謝你了! – Boognish
我不明白爲什麼人們仍然建議的Java Swing而不是JavaFX的... – Tobi
JavaFX是在擺一個更好的選擇,我同意。但爲了簡單起見,我在這裏和Swing一起去了。 – nbokmans