Guest User

Untitled

a guest
Jul 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. button.addActionListener(new StyledEditorKit.AlignmentAction("Left Align",StyleConstants.ALIGN_LEFT));
  2.  
  3. HTMLEditorKit kit = new HTMLEditorKit();
  4. BufferedOutputStream out;
  5. try {
  6. FileOutputStream i1=new FileOutputStream("C:/SaveFile.vm");
  7. out = new BufferedOutputStream(i1);
  8. kit.write(out, m_doc, m_doc.getStartPosition().getOffset(), m_doc.getLength());
  9. } catch (Exception e21){
  10.  
  11. }
  12.  
  13. protected HTMLDocument m_doc;
  14. protected StyleSheet m_context;
  15. InputStream in = new FileInputStream("C:/SaveFile.vm");
  16. m_doc = (HTMLDocument)kit.createDefaultDocument();
  17. kit.read(in, m_doc, 0);
  18. m_context = m_doc.getStyleSheet();
  19. jtextpane.setContentType("text/html");
  20. jtextpane.setDocument(m_doc);
Add Comment
Please, Sign In to add comment