• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to scroll in a JEditorPane

 
Alejandro Barrero
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am displaying an HTML document in a JEditorpane and I want to scroll to a specific word in the document. How do I do it?
 
Alejandro Barrero
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found it. JtextComponent.select(int start, int end) does the trick.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic