#24 looses data in scroll when maximized

V2.0_beta_3
closed
nobody
5
2005-12-11
2005-04-04
Anonymous
No

If you open PKLite then do a query to populate the
results table. Then maximize the WindowFrame then
maximize the JInternalFrame. When you scroll in the
results table you only get 100 results returned. The
difference in the max value of the scoll bar minus the
300 buffer is always greater than the current value of
the the scroll bar.

This has to do with the way the scrollbars are
initialized on JScrollPanes. They are drawn in ratio
to the data it has to scroll. In this case it is 100
records. If you maximize the frame then the scroll bar
knob grows proportiantly, preventing the the retreival
of the next 100 results.

The fix is to include the size of the knob in the
calculation for loading the next page of the result set.

if ((jsb.getMaximum() - 300) <= (e.getValue() -
jsb.getVisibleAmount()/2))

Thanks
Trevor

Discussion

  • dengar
    dengar
    2005-04-07

    Logged In: YES
    user_id=1002544

    Thanks for the fix. I have been trying to find a solution
    to this form some time.

     
  • Trevor Dunn
    Trevor Dunn
    2005-04-12

    Logged In: YES
    user_id=663502

    No Problem. Glad to help

     
  • dengar
    dengar
    2005-12-11

    • milestone: 463162 --> V2.0_beta_3
    • status: open --> closed