I have a JtextPane with text say "i like java it is a good language". in the above text suppose i have made "like java" and "good language" text underlined. And i have added a mouse listener to this JTextpane. the whole idea is to create a hyperlink so that when the user clicks anywhere on "like java" then i want to get the complete text("like java") where i clicked and using this text i want to do some operation. How can i get the underlined text?
posted 8 years ago
SwingX provides a Hyperlink component that's very functional. Try it out!