Hi,
I add 500 JPanels to a JScrollPane which is equipped with a FlowLayout
Manager (i.e. this is some kind of thumb view with a vertical scrollbar
only). The scrollbar is adjusted accordingly to the extent of the
scrollpane.
Now I remove the 500 panels and insert them again. What happens is, that now
the drag button of the scrollbar is only half as high as it was before and
the size of the viewport is twice as big as before. When repeating this
step, the view port keeps growing and the scrollbar drag button keeps
shrinking.
What is the correct way to reset the view/scrollpane/scrollbar?
Thanks.
cu
Rene
Rene Ruppert - 27 Nov 2003 15:16 GMT
I added the components by using: this.add() and removed them by calling
myScrollPane.remove() - i.e. they were never removed since they were added
to a completely different component. :-)
ak - 27 Nov 2003 18:41 GMT
Ok now I see that your question was wrong.
I was really wondering how can some one add 500 panels to JScrollPane ;-)
--
____________
http://reader.imagero.com the best java image reader.
> I added the components by using: this.add() and removed them by calling
> myScrollPane.remove() - i.e. they were never removed since they were added
> to a completely different component. :-)