Adding custom shapes to JTextpane and saved to new Word document

我与影子孤独终老i 提交于 2019-12-20 04:22:45

问题


If I load a Word document into a JTextPane, is there a way I could drop a custom shape in it, then save it as a new Word document?

The results I'm looking for are just like dropping a shape anywhere onto the document using Insert-> Shapes in MS Word.


回答1:


docx4all is a Swing-based docx editor.

Like DocxEditorKit, it is built on top of docx4j.

You'd need to extend it to support the functionality you are describing.




回答2:


You can try to extend the DocxEditorKit http://java-sl.com/docx_editor_kit.html adding your feature there



来源:https://stackoverflow.com/questions/15611562/adding-custom-shapes-to-jtextpane-and-saved-to-new-word-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!