-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.2
-
generic
-
generic
Name: skT88420 Date: 01/03/2000
java version "1.2.2"
HotSpot VM (1.0.1, mixed mode, build g)
I have the following problem when using a JTable in a JScrollpane: when calling
the JViewport.scrollRectToVisible() where the passed in rectangle is the
bounding box of the selected cell in the table. The scrollRectToVisible()
method can sometimes call the validateView() method wich in turn can place the
viewpoint of the table to a valid location. Let's call this viewpoint the
intermediate viewpoint. Next the scrollRectToVisible() calculates a new offset
for the passed in contentrectangle against the bounds of the view and uses this
offset to calculate a new viewpoint against the intermediate viewpoint and as
such it may be calculating a totally incorrect viewpoint and thus forcing the
scroll to 'happen twice' or calculating a viewpoint outside the bounds of the
table. The result is a viewport on the table with the region where the table
should be painted totally greyed out. No call to table paint happens because
it's location is outside the width and height of the table.
Another problem is that it is very difficult for me to distill a neat test case
where the validation in the scrollRectToVisible is called and resulting in the
incorrect calculation of the viewpoint. Maybe you guys can help me out here.
A remark is that this validating of the view of the viewport is not programmed
in JDK1.2fcs and as such the bug is not happening there. But in version 1.2fcs
a bugfix was introduced for bug 4139455 to have the JViewport.setViewPoint()
test if the point passed in as a parameter, is in the bounds of the view at
hand. So normally the problem should not be apparent in 1.2.2 because the
invalid viewpoint should be corrected there. However this bugfix has
disappeared in JDK1.2.2 if I compare the source of JViewport against it's
1.2fcs release. I do not know if it will be solved in the Kestrel project.
I know there are a few bugs reported for the scrollRectToVisible() routine, but
I did not find one that is satisfactory for the problem I described. Sorry if
it is a duplicate.
Greetings,
Wim Van Leuven
System Engineer
LD Consulting NV
###@###.###
PS: It is not really a problem this bug, but it is not nice to show the end-
user an interface where he has to click or 'wiggle' the scrollbar to make his
table appear after he has done some action.
(Review ID: 99504)
======================================================================
- duplicates
-
JDK-4217252 JViewport.scrollRectToVisible allows scrolling beyond bounds of component
-
- Resolved
-