HyperlinkListener
javax.swing.event.HyperlinkListener
JTextPane tp = ... tp.setText("<html><body><a href=http://javawiki.sowas.com>JavaWiki</a></body></html>"); tp.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) System.out.prinln("Sie haben diesen Link angeklickt: " + e.getDescription()); } });