How could I insert formatted text from my JTextArea into mysql database. The only formatting I'm currently interesting in, is preserving "carriage return".
you don't have to do anything, just insert and mysql will keep carriage return, when you pull out the text, simply put <pre> selected text </pre> and it will show exactly the same input enter.