How to detect click on Image in JTextPane
I've got some functionality for inserting images in my textPane by inserting img-html with src-attribute and so on.
Now I want to add a tooltip and an action to this inserted image. I found some examples for "clickable" hyperlinks, but this is no option for me, because my textpane is editable (so the hyperlinklistener isn't called) and I don't want to cascade "img" and "a" tags.
Is there some method like "textPane.addHyperlinkListener()" only for images which works on editable textpanes?