Results 1 to 2 of 2
- 04-22-2010, 04:30 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 1
- Rep Power
- 0
Formatting numbers or decimals (around comma)
Hi,
I need to print some numbers, but I need to align them in this way (comma always on same position):
XML Code:123 4,5 26,65 9999,53
So no zero padding, or just replacing by spaces (because in some fonts not all characters have the same size). How do I do this? Is there a library available?
Thanks!Last edited by Joris; 04-22-2010 at 04:33 PM.
- 04-22-2010, 05:46 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Keep a fix width to the comma, then arrange the leading spaces accordingly. You've to use a fix width, otherwise there is no way to track it.
I'm wonder what's the requirement to align numbers like this.
Similar Threads
-
Decimals in java help!!
By Gold in forum New To JavaReplies: 3Last Post: 12-09-2009, 11:25 PM -
Delimite the file using comma
By gokulcool in forum New To JavaReplies: 3Last Post: 12-30-2008, 05:40 PM -
number to word with decimals
By fertas in forum New To JavaReplies: 3Last Post: 08-30-2008, 03:12 AM -
Java Program To Convert A Number In To Words With Decimals
By javanewbie in forum New To JavaReplies: 1Last Post: 07-02-2008, 01:58 PM -
get more decimals?!?! please help!
By michcio in forum New To JavaReplies: 7Last Post: 05-22-2008, 10:26 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks