aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JScrollPane update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JScrollPane update" Watch "JScrollPane update" New topic
Author

JScrollPane update

R Johnson
Greenhorn

Joined: Jan 05, 2010
Posts: 28

If you change the size of an Object that is a component of JScrollPane what method allows resizing of the scrollbars so that it knows it's looking at a smaller/larger portion of the image?
in my code I tried using paint and revalidate and invalidate none of which gives the desired effect

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Have you tried calling revalidate on the viewport?
R Johnson
Greenhorn

Joined: Jan 05, 2010
Posts: 28

That works great thanks Pete!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JScrollPane update