Hi members
I am facing a problem with writing a
string into a file. I am explaining the scenario. Please help.
I have a text which is read from JTextArea and that text is having line breaks in it. I am trying to write this text into the text file. the characters of the text are being written properly but the line breaks are not getting written into the file. I tried the
pattern "\\n" and splitted the text into strings and then tried to write each string into the file by appending a line separator to each string. but later facing some problem with reading the text from the file and displaying in text area. my main aim is to read the text from the JTextArea and write it as it is into a file and then read the content from the file and display in the textArea. here is the code I am trying to read from the file and displaying.
and for writing into the file the following code
please help