JDK-4750421 : 4143833 - regression in 1.4.x
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2002-09-19
  • Updated: 2002-11-16
  • Resolved: 2002-11-16
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.2 mantisFixed
Description
###@###.### 2002-09-19

This is the same problem as reported in 4143833. The problem
seems to be back in 1.4.x releases.

Here is a test case that shows the problem.

import javax.swing.*;
public class V extends JFrame {
  public V () {
    JTable table = new JTable(30, 5);
    JScrollPane pane = new JScrollPane(table);
    getContentPane().add(pane);
    pane.getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
    setSize(400, 400);
    }
  public static void main(String[] args) {
    V v = new V();
    v.setVisible(true);
    }
  }

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b08
24-08-2004

EVALUATION xxx Name: apR10133 Date: 09/24/2002 The problem is that JViewport.paint() is never called while we change the selection and hence the selection is not saved to backingStoreImage. The way to fix it is to paint appropriate part of view to backingStoreImage before it will be drawn. ###@###.### ======================================================================
24-08-2004

SUGGESTED FIX Name: apR10133 Date: 09/24/2002 ------- JViewport.java ------- *** /tmp/sccs.gPayhY Tue Sep 24 17:06:34 2002 --- JViewport.java Tue Sep 24 17:05:02 2002 *************** *** 777,785 **** bsg.copyArea(blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy); g.setClip(clip.x, clip.y, clip.width, clip.height); ! // Paint the rest of the view; the part that has just been exposed. ! Rectangle r = viewBounds.intersection(blitPaint); ! bsg.setClip(r); super.paint(bsg); // Copy whole of the backing store to g. --- 777,785 ---- bsg.copyArea(blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy); g.setClip(clip.x, clip.y, clip.width, clip.height); ! // Paint the whole viewport as something could be ! // changed without saving at backingStoreImage ! bsg.setClip(0, 0, width, height); super.paint(bsg); // Copy whole of the backing store to g. ###@###.### ======================================================================
24-08-2004