United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4143833 : View in JViewPort gets out of sync with backing store enabled

Details
Type:
Bug
Submit Date:
1998-05-29
Status:
Closed
Updated Date:
1999-01-15
Project Name:
JDK
Resolved Date:
1999-01-15
Component:
client-libs
OS:
solaris_2.6
Sub-Component:
javax.swing
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.2.0
Fixed Versions:
1.2.0 (1.2fcs)

Related Reports

Sub Tasks

Description
 If the backing store is enabled in the JViewport it is possible for the view to get out of sync. This can be shown by: bring up a JScrollPane with a JTable. Select a row, scroll the scrollpane by way of the scrollbars, notice the row that was selected is not drawn selected.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic

FIXED IN:
1.2fcs
swing1.1

INTEGRATED IN:
1.2fcs


                                     
2004-06-14
EVALUATION

This is happening because of the performance tweak put in JComponent. When it is determining who is going to get a paint it uses the method isOptimizedDrawingEnabled. JViewport subclasses this and returns false, unfortunately JComponent will only honor this if the component has more than one child, which is not true for JViewport.
We therefore need to remove the check for more than one child in JComponent and it should work.
sky 1998-05-29
                                     
2004-06-11
WORK AROUND

Disable backing store of viewport.
                                     
2004-06-11
SUGGESTED FIX

 
                                     
2004-06-11
PUBLIC COMMENTS

This is happening because of the performance tweak put in JComponent. When it is determining who is going to get a paint it uses the method isOptimizedDrawingEnabled. JViewport subclasses this and returns false, unfortunately JComponent will only honor this if the component has more than one child, which is not true for JViewport.
We therefore need to remove the check for more than one child in JComponent and it should work.
sky 1998-05-29
                                     
2004-06-10



Hardware and Software, Engineered to Work Together