wood burning stoves 2.0*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 18120
    
    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.
 
wood burning stoves
 
subject: preserve line breaks from jtextarea when storing in database
 
Similar Threads
How to handle ENTER key event in JTextArea
Retain buffer formatting
Display problem in JFrame
Searching for string usign JSTL
Preserve word wrap and line breaks