You just read the data from the JTextArea into a String and store that String into the database. Why do you ask? Did you already try something which failed to preserve the line breaks? If so, let's have a look at your code and get it fixed up.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: preserve line breaks from jtextarea when storing in database