This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am supposed to display data from a file into a JTextArea.
To make it scrollable, I put it into a JScrollPane, but as soon as I input the data read from the file into JTextArea, the text goes out of bounds.
If i don't put anything in the JTextArea, and enter text from keyboard, it remains scrollable, but if I set text read from a file, it's scroll doesn't work.