Results 1 to 3 of 3
Thread: problem in saving file
- 01-23-2010, 01:25 PM #1
Member
- Join Date
- Jan 2010
- Posts
- 13
- Rep Power
- 0
problem in saving file
i have used the following code to save the text in a textpane into a file
final RTFEditorKit kit = new RTFEditorKit();
jta.setEditorKit(kit);
jfr.setTitle(fname.getName());
OutputStream out = new FileOutputStream(fname);
kit.write(out,doc,0,doc.getLength());
out.close();
where jfr is the main frame,jta is the textpane,fname is the filename given by the user,doc is the styled document of the text pane...
my problem is that when i give the filename and click save button the text is stored in the file but the textpane is made empty..why is that happening..??
-
Here's where an SSCCE would help us to much better understand just what is not working. Please have a look at the link and consider posting one. Best of luck!
- 01-23-2010, 04:28 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 76
- Rep Power
- 0
Similar Threads
-
Problem Saving a file
By GraemeH in forum New To JavaReplies: 1Last Post: 04-09-2009, 12:14 AM -
Saving ArrayList to File
By nwboy74 in forum Advanced JavaReplies: 6Last Post: 12-08-2008, 10:19 AM -
Saving to a Text File
By jadaleus in forum Advanced JavaReplies: 2Last Post: 10-17-2008, 06:50 PM -
Saving data in an XML file
By Thez in forum New To JavaReplies: 1Last Post: 12-08-2007, 09:24 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks