Eventos com HyperLinkListener

Estou usando o componente JEditorPane para exibir algumas paginas html que possuo. So que eu gostaria de tratar os Links destas paginas, ao menos, “pegar” a url do link.
Eu sei que devo usar o HyperLinkListener e o HyperLinkEvent de alguma maneira. Mas a pergunta e: Como usar ?

O exemplo utiliza JTextPane, mas é a mesma coisa para o JEditorPane.
:wink:

final JTextPane txt01 = new JTextPane();
txt01.addHyperlinkListener(new HyperlinkListener(){
public void hyperlinkUpdate(HyperlinkEvent e){
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
txt01.setPage(e.getURL());
}
catch (IOException ioe){
ioe.printStackTrace();
}
}
}
});

ou

final JTextPane txt01 = new JTextPane();
HyperlinkListener myHL = new HyperlinkListener(){
public void hyperlinkUpdate(HyperlinkEvent e){
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
txt01.setPage(e.getURL());
}
catch (IOException ioe){
ioe.printStackTrace();
}
}
}
};
txt01.addHyperlinkListener(myHL);

Eu to tentando criar um browser e consegui fazer o HyperlinkListener funcionar, porém, páginas com botões submit, resert … não funcionam. Existe algum outro tipo de evento pra isso? Qual é? Como utilizar?