JDK-4365758 : JTree returns strange values for getScrollableUnitIncrement()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-08-25
  • Updated: 2000-12-05
  • Resolved: 2000-12-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Relates :  
Relates :  
Description
The JTree in SwingSet2 returns negative values if the scrollthumb is dragged all the way to the top of the scroll track, and then the up scroll arrow is clicked.  This causes the JTree to scroll _DOWN_ ever so slightly, even though the up arrow was clicked.  (Incidentally, this effect is magnified somewhat with mouse wheel scrolling, but you'll have to wait for the next integration to see that =).  This only happens one time - once the scroll thumb is moved down slightly, clicking the up scroll arrow again yields a unit increment of 0.

brent.christian@eng 2000-08-25

The SwingSet2 ListDemo also behaves strangely.  Scrolling the left-hand list all the way to the bottom, and then clicking the up scroll arrow (or wheeling up) only scrolls the list by 1 pixel.  It should be more like 6.

brent.christian@eng 2000-09-07

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
14-06-2004

EVALUATION I believe both of these are happening because JTree/JList is not checking for negatives when the component has insets. scott.violet@eng 2000-11-27 JTree was not checking if the first row was inset, and thus could return a negative value from getScrollableUnitIncrement. I believe the list problems are happening because of 4378013. scott.violet@eng 2000-11-28
28-11-2000