Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane:  RSS feed

 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all:
How can i make the scrollbar scroll back to the top??
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are working with scrollbars alone, use setValue() on JScrollBar.
If the scrollbar you are saying is the scrollbar of JScrollPane and any component is added to JScrollPane, use scrollRectToVisible() on the Component. This method is from the JComponent class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!