I have created a text file, which I can read and write to, but I want to know if there is an easy way to delete text (one line at a time) from a GUI, without the user editing it directly themselves(i.e. selecting the text somehow(Haven't figured this out either) then click a button, and it magically disappears in the file). Currently I have the text displayed in a JTextArea which is in a JScrollPanel.
Originally posted by Wes Beere: I still need to find out how to edit the file, preferably without rewriting the whole thing every time.
That's essentially your only option. Technically, you only have to rewrite the file starting from the point where the text was deleted. This is why most applications save to disk only when the user tells them to.