
-----------------------------------
hamid14
Wed Jun 08, 2011 10:54 am

Jbutton write to file when clicked
-----------------------------------
I have a JButton that when you click it, it's supposed to write to a file named "in.txt". The problem is that when you click the button, it doesn't write to file. I have another JButton that reads in text from a text file and prints it out when you click the button, that one works. Why isn't the 1st jbutton writing to file?

-----------------------------------
DemonWasp
Wed Jun 08, 2011 10:59 am

RE:Jbutton write to file when clicked
-----------------------------------
At a complete guess, since you forgot to post your code, you forgot to .close() the output stream.

-----------------------------------
hamid14
Wed Jun 08, 2011 11:24 am

Re: Jbutton write to file when clicked
-----------------------------------
That was it, thanks.
