Solved

How to get the line and column numbers in JTextPane

Posted on 2006-11-10
2
522 Views
Last Modified: 2008-01-09
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.
0
Comment
Question by:MichaelRubinshteyn
2 Comments
 
LVL 24

Accepted Solution

by:
sciuriware earned 250 total points
ID: 17920132
As wrapping is involved you should work from the caret position in the display.
Not easy.

;JOOP!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question