Scrolling Animation in Swing

Hi everybody,

I haven't found much luck searching about animation in Java. I'm writing an application that has a paging capability, but I don't want the next page to just load normally. This is kind of a special application--what I'd like to do is scroll downward, like one of those old parchment scrolls, when we want to get to another page. So, the lines of the old page would scroll up and be replaced with the new lines until the entire new page is visible. Can anyone point me in the right direction do do this? I'm imagining maybe something with a JTextPane and something like a JScrollPane, but I'm really not sure how to do this, especially without showing a scrollbar.

Any ideas would be great!

Thanks,

Jezzica85

[758 byte] By [jezzica85a] at [2007-11-27 10:28:03]
# 1

you can still use a JScrollPane, and give the scrollBar the flick

Michael_Dunna at 2007-7-28 17:49:29 > top of Java-index,Desktop,Core GUI APIs...
# 2

Is there an automatic scroll or something on JScrollPanes that makes that possible? I didn't see one in the javadoc.

Jezzica85

jezzica85a at 2007-7-28 17:49:29 > top of Java-index,Desktop,Core GUI APIs...
# 3

scrollPane.getViewport().setViewPosition(...);

camickra at 2007-7-28 17:49:29 > top of Java-index,Desktop,Core GUI APIs...
# 4

Cool! Thanks, camickr!

Jezzica85

jezzica85a at 2007-7-28 17:49:29 > top of Java-index,Desktop,Core GUI APIs...