Finding position of a specific line - JEditorPane

  • Follow


I have two JEditorPanes. The first one shows the  HTML pages, while the
second contains anchor links to the page that is currently displayed.
What i am trying to do is to highlight the current line of the first
JEditorPane, where the user moves on by pressing an anchor link from
the other JeditorPane.
However, i am having difficulties to find the position of the anchor
that is currently visible within the document, in order to set the
CaretPosition of the JEditorPane accordingly and perform the line
highlighting. I also have tried to find the pos by looking for a
specific string within the page, but it seems to give me incorrect
results.

Is there any feasible workaround to this problem?

Thanks!

0
Reply dendriv (6) 7/7/2006 4:36:37 PM


0 Replies
406 Views

(page loaded in 0.03 seconds)

Similiar Articles:













7/24/2012 8:30:14 PM


Reply: