Vertical scrollpane problem in jdialog
i have a question regarding th开发者_运维问答e vertical scrollpane in jdialog.when i run My application the jdialog vertical scrollbar displays end of the data.I need to scroll it upwards.How can i get the scrollbar bydefault at the top.
JViewport#scrollRectToVisible()
What are you scrolling? If a text component, oftentimes setting the caret to the top of the component works. Please have a look at Rob Camick's Swing tips blog for more on this: Java Tips Weblog: Text Area Scrolling
精彩评论