aspose 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
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: 18541
    
    8

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: preserve line breaks from jtextarea when storing in database