File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Leading Spaces instead of zeros?

 
John Hunkle
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following program displays
0002.34
0054.00
0065.00
0083.00
0000.54
1432.55
0923.60
0001.06
instead of

What do I need to change/add in order to get the desired output?
Thanks much in advance.

The desired output should be aligned on the decimal points (i.e. the zeros in the actual output should be spaces/' ')
Desired output is:

(Edited by Cindy to combine three posts)
[This message has been edited by Cindy Glass (edited February 21, 2001).]
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your method call "fmt.setMinimumIntegerDigits (4)" is the problem. You don't need it.

Bosun
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use the decimalFormat() to make the number of digits after the decimal the same and the right justify them all. I can't find any other method.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic