Misbehaviour of scrollbars in JScrollPane

From: Rene Ruppert (rener_at_incca.com)
Date: 11/26/03

  • Next message: Rhino: "Re: Need some help with animation"
    Date: Wed, 26 Nov 2003 13:09:53 +0100
    
    

    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


  • Next message: Rhino: "Re: Need some help with animation"
  • Quantcast