Converting plain text into embedded hyperlink
807606May 9 2007 — edited May 9 2007I'm attempting to output text whereby the majority of it will be simple plain text, but I would like some sentences to be converted to a hyperlink which when clicked will allow me to display a document held in a database.
What would be the best way of accomplishing this? Basically every sentence has a flag set, when I process each sentence I check the flag and based on this I would like to display as is or as a hyperlink.
At the moment I am outputting in a JTextPane but can change that if required.
Thanks in advance. :)
EDIT: Just thought I'd clarify a little - I don't need the text to be a hyperlink in the traditional sense of the word but merely for the text to be clickable, allow the program to recognise which text passage has been clicked, and act appropriately.
Message was edited by:
thoseion