The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

JEditorPane programmatic scrolling

Posted by Terry Lipford on November 10, 2001 at 5:39 PM

I am using a JEditorPane to display a Java source file, and my goal is to be able to display the line number and column number somewhere on my JFrame much like all the Java IDE's do. I also want to be able to provide a "goto line number" and "search for text string" set of functions. I have searched everything I can find on the subject of JEditorPane and have not been able to locate anything that describes how I can position the pane to a given line number. Obtaining the Element list from the Document appears to have some 'hope', but I am not completely certain that method will work.

Anyone have any ideas on how to do the above ?



Replies:
  • Scrolling Jay November 19, 2001 at 8:03 AM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us