wood burning stoves 2.0*
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!
 
jQuery in Action, 2nd edition
 
subject: JScrollPane update
 
Similar Threads
Problemwith freehand drawing on image
Graphics 2d Object and Scroll Bar Issue
Popup menu not responding with mouse event
Graphics 2d Object and Scroll Bar Issue
Can you help me plzzz with a graph?