Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / May 2005

Tip: Looking for answers? Try searching our database.

Find out length of displayed HTML in JEditorPane

Thread view: 
Hans-Joachim Daniels - 18 May 2005 17:19 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.