File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes preserve line breaks from jtextarea when storing in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "preserve line breaks from jtextarea when storing in database" Watch "preserve line breaks from jtextarea when storing in database" New topic
Author

preserve line breaks from jtextarea when storing in database

Sidhu roy
Greenhorn

Joined: Aug 11, 2011
Posts: 15
how to preserve line breaks of jtextarea while storing and retrieving text from database(oracle)?
thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 19312
    
  10

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.
 
Consider Paul's rocket mass heater.
 
subject: preserve line breaks from jtextarea when storing in database