Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Jbutton write to file when clicked
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hamid14




PostPosted: Wed Jun 08, 2011 10:54 am   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Wed Jun 08, 2011 10:59 am   Post subject: 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




PostPosted: Wed Jun 08, 2011 11:24 am   Post subject: Re: Jbutton write to file when clicked

That was it, thanks.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: