how to get content from a JEditorPane and send it to a output stream
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
If anyone has any suggestions,please reply.
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