Greetings group,
how can find out the length of the displayed HTML in a JEditorPane, or
to describe more exactly what I want, the maximum CaretPosition, that
is the last thing I can get as a CaretPosition at the end of the
document?
pane.getText().length() only gives me the length of the raw HTML and
for the EditorKit I only found methods to insert sth. at a given
offset, but not how to find out the maximum offset.
Thank you very much in advance for your help,
Hans-Joachim Daniels
Christian Kaufhold - 18 May 2005 20:07 GMT
> how can find out the length of the displayed HTML in a JEditorPane, or
> to describe more exactly what I want, the maximum CaretPosition, that
> is the last thing I can get as a CaretPosition at the end of the
> document?
pane.getDocument().getLength()
Christian
hajo.daniels@gmx.de - 20 May 2005 15:56 GMT
That did it.
Thank you very much,
Ha-Jo