I want to read the contents of the jtextarea and save it to a file. That part is easy but how do I save it so the data will not be one long line of information. I want to save teh date line by line like I typed it in the jtextarea.
Hi Felipe, Welcome to JavaRanch! If when you type the information in, you let the JTextArea do automatic line wrapping, then the data is one long line, regardless of how it looks. On the other hand, if you press Enter at the end of each line, those should translate into '\n' characters which would be part of the data and should end up in the file. The best thing to do, if you want the data to be in lines of a specific length in the file, would be to do the line-breaking yourself when you write the data out. There's a nice piece of code to do this in the Java Almanac online (a great resource -- browse around while you're there!)