I have to write the content of textarea into a file with line breaks. I got the output like, it is written as one string in the file.
public void actionPerfo
Use JTextComponent.write(Writer):
Stores the contents of the model into the given stream. By default this will store the model as plain text.
BufferedWriter writer = new BufferedWriter(new FileWriter("filename.txt")); text.write(writer);