Say a plain text and an image are entered by a user into a text pane. How to separately read the text and the image from such text pane?
If you have HTMLEditorKit set as the default editor kit, then get all the elements of the document. Then iterate through those elements and look for image element. Then separate them from the text elements. Following links may come to your help: