JEditorPane scrolling to the current caret position

Posted by Elliott on Stack Overflow See other posts from Stack Overflow or by Elliott
Published on 2010-03-25T15:24:19Z Indexed on 2010/03/26 2:43 UTC
Read the original article Hit count: 506

Filed under:
|
|
|

I have a JEditorPane which I use to display an HTML document. the document has hyperlinks embedded in it. When a user clicks on a bookmark a position the caret to the associated place in the JeditorPane. The JeditorPane is then suppose to scroll to this position. This works mostly. But, I noticed that if the document has a lot of "break tags" (BR) tags embedded in it, the scrolling does not position the JEditorPane to right place. It's like the tags throw the callebration off. Any suggestions on what to do about this?

© Stack Overflow or respective owner

Related posts about java

Related posts about jeditorpane