D
David Baer
I have a JEditorPane with html-text. The JEditorPane is set un-editable and
i have a HyperlinkListener attached to it. Here is the relevant code:
JEditorPane ep = new JEditorPane();
ep.setText(someHtmlString);
ep.addHyperlinkListener(new Hyperactive()) ;
ep.setContentType("text/html");
ep.setEditable(false);
ep.setCaretPosition(0);
However, the HyperlinkListener does not react on most events. On some link
it reacts, but on most it does not. I can not detect the difference or the
reason for this behavior.
I've found several other posts referring to this problem, but never has a
solution been published. I have also published on comp.lang.java.gui (sorry
for crossposting) but neither there a solution has been published.
Has anyone encountered this problem? Any idea what the problem could be? How
to solve it?
Thank you for any hint!
david
i have a HyperlinkListener attached to it. Here is the relevant code:
JEditorPane ep = new JEditorPane();
ep.setText(someHtmlString);
ep.addHyperlinkListener(new Hyperactive()) ;
ep.setContentType("text/html");
ep.setEditable(false);
ep.setCaretPosition(0);
However, the HyperlinkListener does not react on most events. On some link
it reacts, but on most it does not. I can not detect the difference or the
reason for this behavior.
I've found several other posts referring to this problem, but never has a
solution been published. I have also published on comp.lang.java.gui (sorry
for crossposting) but neither there a solution has been published.
Has anyone encountered this problem? Any idea what the problem could be? How
to solve it?
Thank you for any hint!
david