How do we save the modifications made to a HTML file using JEditorPane?
Created May 4, 2012
Sandip Chitale
// Say - editorPane is your JEditorPane try { FileWriter writer = new FileWriter("file.html"); EditorKit kit = editorPane.getEditorKit(); kit.write(writer ,editorPane.getDocument() ,0 ,editorPane.getDocument().getLength()); } catch (Exception e) { //use better exception catching here System.err.println(e); }