Adding custom shapes to JTextpane and saved to new

2019-03-02 05:40发布

问题:

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