Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- button.addActionListener(new StyledEditorKit.AlignmentAction("Left Align",StyleConstants.ALIGN_LEFT));
- HTMLEditorKit kit = new HTMLEditorKit();
- BufferedOutputStream out;
- try {
- FileOutputStream i1=new FileOutputStream("C:/SaveFile.vm");
- out = new BufferedOutputStream(i1);
- kit.write(out, m_doc, m_doc.getStartPosition().getOffset(), m_doc.getLength());
- } catch (Exception e21){
- }
- protected HTMLDocument m_doc;
- protected StyleSheet m_context;
- InputStream in = new FileInputStream("C:/SaveFile.vm");
- m_doc = (HTMLDocument)kit.createDefaultDocument();
- kit.read(in, m_doc, 0);
- m_context = m_doc.getStyleSheet();
- jtextpane.setContentType("text/html");
- jtextpane.setDocument(m_doc);
Add Comment
Please, Sign In to add comment