This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes scrollPane.getHorizontalScrollBar().setValue Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "scrollPane.getHorizontalScrollBar().setValue Problem" Watch "scrollPane.getHorizontalScrollBar().setValue Problem" New topic
Author

scrollPane.getHorizontalScrollBar().setValue Problem

comus leong
Greenhorn

Joined: Jun 01, 2012
Posts: 1
hi, i want setValue to the end of the scrollBar. but fail.

here is the code, result is picture1


but, but , but it is successful when i type this code twice.
here is the code, result is in picture2


please help me and can i type this code once to solve this problem?



[Thumbnail for 1.png]


[Thumbnail for 2.png]

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5045
    
  10

Hello comus and welcome to the Ranch! The code snippet does not provide enough information for a definitive answer. To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem.

Are the scroll pane and its content realized at the time you call getMaximum()?


luck, db
There are no new questions, but there may be new answers.
 
Don't get me started about those stupid light bulbs.
 
subject: scrollPane.getHorizontalScrollBar().setValue Problem
 
It's not a secret anymore!