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. Technical questions should be asked in the appropriate category. Thank you!

Line numerator

843807Oct 8 2009 — edited Oct 8 2009
G'day, everyone!

I have encountered the necessity of adding a new component extra to the JTextPane that would display the line numbers. That's a feature you might see in pretty any IDE (like this for an instance). I thought of creating another text pane and filling it automatically (rather bad idea) but I will also probably have to make those numerators interactive (i.e. clicking it to highlight the respective line and marking certain lines).
Quite similar problem is creating a pane by means of which a user could slurp up some certain code sections (again, typical IDEs' feature).

Since my experience is yet too limited, I'm clueless, what is the component I'd better base my classes on?

Thanks in advance!

PS. I beg your pardon, the thread was intended for the Swing section. But nonetheless :)

Edited by: SqueezyMo on Oct 8, 2009 10:59 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2009
Added on Oct 8 2009
2 comments
123 views