I have a JTextPane that displays HTML text. HTML text has hyperlinks with tags …
I want to invoke a java function when the user clicks on a link within the html text displayed on the JTextPane.
How can I achieve this? If there is a need to implement an event listener? If so what is the appropriate event listener that is to be handled?
The listener type you are looking for is a HyperlinkListener, some code snippet: