-
how to get content from a JEditorPane and send it to a output stream
Hey!
I need some help.Im making a program that utilizes a
JEditorPane to display content.I also want the user to be
able to save what he/she typed in.So,I use the following code to get all html/rtf/text
content from the EditorPane and write it to a file but it doesnt seem to work:
//retrive jeditorpane's currently displayed file name
File file=new File(jeditorpane.getPage().toString());
FileWriter fw=new FileWriter(file);
//retrive all content and write
fw.write(jeditorpane.getText());
fw.close();
If anyone has any suggestions,please reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks