TheGunslinger
2010-11-07 06:10:26 UTC
Does JAVA offer a Format() method for aligning output into defined
columns?
All I am currently using is "\t" to get some spacing, but that doesn't
tab to a column per se.
I need output as starting on a specific columnar tab like in a
wordprocessor. I know this is implemented in C++, but am unable to
find a similar format command in JAVA?
Wanted: (Example: ColumnWidth = 10)
Item amount1 amount2 amount3 etc
versus where spacing depends erratically on the String.length()
item amount1 amount2 amount3 amount4 etc.
TIA,
MJR
columns?
All I am currently using is "\t" to get some spacing, but that doesn't
tab to a column per se.
I need output as starting on a specific columnar tab like in a
wordprocessor. I know this is implemented in C++, but am unable to
find a similar format command in JAVA?
Wanted: (Example: ColumnWidth = 10)
Item amount1 amount2 amount3 etc
versus where spacing depends erratically on the String.length()
item amount1 amount2 amount3 amount4 etc.
TIA,
MJR