Re: Programmtically Scrolling a Scrollpane
From: Aaron Davies (aaron.davies_at_knox.army.mil.invalid)
Date: 07/28/04
- Next message: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Previous message: Real Gagnon: "Re: How to make a JFrame "dumb"..."
- In reply to: Thomas Weidenfeller: "Re: Programmtically Scrolling a Scrollpane"
- Next in thread: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Reply: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Jul 2004 14:11:19 GMT
Thomas Weidenfeller wrote:
> Aaron Davies wrote:
>
>> Hi, I'm writing a graphics program, and I'm currently implementing a
>> zoom function. The graphics are drawn on a JPanel wrapped in a
>> JScrollPane, and while my zoom is working fine as far as scaling the
>> graphics, I'm having a lot of trouble figuring out how to scroll the
>> scrollpane.
>
>
> getViewport().setViewPosition()
I'm having no luck. I tried both that and invoking scrollRectToVisible
on the JPanel (rather than the JScrollPane), as suggested by Chrisitan
Kaufhold, but neither seem to do *anything*. I'm confident of my
calculations on the rect to scroll to, as I've added code to draw it to
make sure, but nothing seems to happen when I invoke one of the
scrolling methods.
- Next message: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Previous message: Real Gagnon: "Re: How to make a JFrame "dumb"..."
- In reply to: Thomas Weidenfeller: "Re: Programmtically Scrolling a Scrollpane"
- Next in thread: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Reply: Andrew Thompson: "Re: Programmtically Scrolling a Scrollpane"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|