Implement a HyperlinkListener. See JEditorPane (Java 2 Platform SE v1.4.2) , in particular the addHyperlinkListener method