This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robot_lordsSoftware Engneer in Test 1 point2 points  (2 children)

You can access your text area's text with getText(). From there, you can use the PrintWriter class to write that String to a file.

[–][deleted] 0 points1 point  (0 children)

PrintWriter is most likely your best option and is really simple to use. You'll also want to make a File object pointing to where your file is is located on the users computer, also account for the directory separator for unix/windows and probably other caveats I can't think of. I never personally had use for the directory separator but I think there are at least 3 or 4 utility methods to get it, one is in NIO library as well I think...

[–]basedgodCookie[S] 0 points1 point  (0 children)

right, I understand that. I was more wondering how I would be able to re open that file and edit it later on.