Link to home
Start Free TrialLog in
Avatar of Computer Guy
Computer Guy

asked on

Java Currency

Hi,

How can I make this line show in currency

so like $300.00

lblP2.setText(Double.toString(pay2));

Open in new window

Avatar of mccarl
mccarl
Flag of Australia image

Something like this should do it...

lblP2.setText(String.format("$%.02f", pay2));

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial