I'm trying to format some text which is being placed in a JTextArea in a JScrollpane. I am looping though an ArrayList and pulling out the values I need. I have set the
String format as follows:
temp = String.format("%1$-20s %2$4s %3$6s%n", name, qty, price);
When the output appears in the JTextArea it looks kind of like the following:
However, if I copy the output from the JTextArea and paste it here, it looks great - exactly like I want it to.
Can anyone please tell me why it does not appear correctly in the JTextArea of my GUI?
Thanks,
Mike
[ EJFH: Added "CODE" tags to preserve formatting. ]
[ October 11, 2006: Message edited by: Ernest Friedman-Hill ]