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

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JScrollPane update" Watch "JScrollPane update" New topic

JScrollPane update

R Johnson

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

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

Joined: Jan 05, 2010
Posts: 28

That works great thanks Pete!
I agree. Here's the link:
subject: JScrollPane update