United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4750421 4143833 - regression in 1.4.x
JDK-4750421 : 4143833 - regression in 1.4.x

Details
Type:
Bug
Submit Date:
2002-09-19
Status:
Resolved
Updated Date:
2002-11-16
Project Name:
JDK
Resolved Date:
2002-11-16
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

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
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.

###@###.###

======================================================================
                                     
2004-08-24
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.

###@###.###

======================================================================
                                     
2004-08-24
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b08


                                     
2004-08-24



Hardware and Software, Engineered to Work Together