Reputation: 1994
I am working on a note taking application which is supposed to include image ,audio ,video along with text So im including a feature to add links(like in evernote )which should display an icon on clicking which that file should open My question is how write to and read from a file so that when a link is encountered an imageicon mus be displayed in textpane similary a link must be written in the file I am already able to implement text links i want to know how to do the same with images(image links)
Upvotes: 0
Views: 80
Reputation: 8855
As an alternative to JEditorPane
: you might want to check out Flying Saucer, which can render XML/XHTML. If you use a suitable XML model internally, you might be able to render your content directly via CSS.
Upvotes: 0
Reputation: 1552
You can Use JEditorPane
to use the functionality of both text and Images in java . This would also enable you to add support for custom text formats to the components of your application.
For details Refer : http://docs.oracle.com/javase/tutorial/uiswing/components/editorpane.html
Upvotes: 1