Scroller is a scrollable container. The idea is to have a scrollable
viewport into a large container with arbitrary components in it.
It works tollerably well, but not quite as good as I had hoped.
There are some shortcomings, that I'll describe here. First some terminology.
The Scroller contains two Scrollbar's and one container that we'll call the
Viewport. The Viewport contains another container we'll call Scrolled.
The Viewport's job is to clip Scrolled to the visible portion selected by
the scroll bars. Ideally, you would treat the Scroller exactly as if
it WERE Scrolled, ie. adding to it, removing, etc; with the scrolling
machinery transparently inserted in between.
Also, Scrolled should be layed out to be as big as it wants to be.
Some of these could, no doubt, be worked around, but this may be moot,
as Javasoft apparently intends to include a similar widget in an upcoming
release of the JDK.
- I hoped to be able to keep the scrolled panel `secret', that is, you would
to add component to the inner scrolled panel. Maybe I still can, but it will
take some trickery.
- Scrolling is quite jumpy.
- If you add items to Scrolled, or a container within it, after it has
already been displayed, Scrolled needs not only to be layed out, but
it should to be resized to its preferred size. This latter doesn't happen
automatically -- I'm not sure how to get it to notice. At present you've
got to invalidate and then validate the Scroller (or Viewport?).
There is a rather nasty bug in Netscape running on SunOS;
the inner panel is not clipped by the viewport panel.
This results in a pretty messy screen.