0

I copied the code from this tutorial and everything works as expected except the hyperlink does nothing after a mouse click. My mouse arrow changes from an arrow to a hand on mouse over, but I expected a browser to be launched. Is this correct behavior? Do I have to add something else to have it launch in a browser?

1

1 Answer 1

5

You didn't add a HyperLinkListener to the editor pane. Read the JEditorPane API for an example on how to do this. While reading the API don't forget to click on the Using Text Components link for a more detailed example.

The Swing tutorial is the place to start for the basics.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.