JDK-4143833 : View in JViewPort gets out of sync with backing store enabled
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1998-05-29
  • Updated: 1999-01-15
  • Resolved: 1999-01-15
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.2.0 1.2fcsFixed
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