Hello,
I have a Java formatted string which looks like the following :
PrintWriter out = renderResponse. getWriter();
...
String format = "|%1$-30s|%2$-10s|%3$-10s|%4$-10s|%5$-10s";
out.printf(form at, field1, field2, field3, field4, field5);
And I can write this formatted string to the sdtout or a file; it works fine. But when I try to write it to a portlet, the formatting does not work. The widths of the fields do not get printed.
I wonder if someone could please tell me what I am doing wrong/what I need to do to get this to work.
Thank you so much,
Akino
I have a Java formatted string which looks like the following :
PrintWriter out = renderResponse. getWriter();
...
String format = "|%1$-30s|%2$-10s|%3$-10s|%4$-10s|%5$-10s";
out.printf(form at, field1, field2, field3, field4, field5);
And I can write this formatted string to the sdtout or a file; it works fine. But when I try to write it to a portlet, the formatting does not work. The widths of the fields do not get printed.
I wonder if someone could please tell me what I am doing wrong/what I need to do to get this to work.
Thank you so much,
Akino