This content has been marked as final. Show 3 replies
thats helps me to understand a bit more, but my problem is still not over. Let me make it even clear this time.
I have a GUI with a button. When I click the button, it is supposed to write to a file. So if I run the program for the first mouse click it will overwrite the file, but when i click on the mouse more than once in the same runtime, it appends to the file instead of overwrite on each click.
The method that is called by the button has following contents:
BufferedWriter out = null;
File output_file = new File(output);
out = new BufferedWriter(new FileWriter(output_file));
out.write("Output this line");
can you provide further insight now