Is there any way to specify variable as the width(right-alignment),
say:
<code>
String str = "some string here";
int var = str.length()*2;
System.out.printf("%vars", str);
</code>
I know the code is dead wrong, but just to illustrate my question.
Anybody?
Ingo R. Homann - 27 Feb 2007 08:37 GMT
Hi,
> Is there any way to specify variable as the width(right-alignment),
> say:
[quoted text clipped - 7 lines]
> I know the code is dead wrong, but just to illustrate my question.
> Anybody?
Perhaps the class java\text\MessageFormat might be useful for you?
Ciao,
Ingo
Lew - 27 Feb 2007 13:19 GMT
> Perhaps the class java\text\MessageFormat might be useful for you?
java.text.MessageFormat
- Lew