Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

Line Number in JTextPane

843804Apr 3 2005 — edited Jul 24 2007
Hi, i'm trying to work out how to get the line number that the caret is on. I can get the caret position but thats just the number of characters before the cursor. I'm sure this must be pretty easy. Please help

clarkie
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2007
Added on Apr 3 2005
10 comments
3,204 views