This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I'm trying to output data from a file to a JTextArea and have encountered an unexpected problem...I want to display data in columns that not only line up with eachother but also line up with the column headers I've pre-inserted into the JTextArea when I build it (e.g. brand, model, price, color). How can I get columns of uniform width? The empty spaces between the text are a different width and are causing all kinds of alignment problems. I've tried to format the text first with String.format(%10s%10s%10s) etc, but this does not seem to work. Please help.