How to get the line and column numbers in JTextPane

I have trouble to get the line number and column number in JTextPane.  We have a status bar to indicate the line number and column number for the current caret position in JTextPane.  The line and column numbers should conside the wrapped text for a long paragraph.
MichaelRubinshteynAsked:
Who is Participating?
 
sciuriwareCommented:
As wrapping is involved you should work from the caret position in the display.
Not easy.

;JOOP!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.