Name: jk109818 Date: 09/17/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
AND
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
FULL OPERATING SYSTEM VERSION : Windows NT Version 4.0
ADDITIONAL OPERATING SYSTEMS : Windows 2000
REGRESSION: Last worked in 1.3.1
A DESCRIPTION OF THE PROBLEM :
With Windows look and feel, JTree repaints whenever the ALT
key is pressed. JTable and JList also exhibit the same
behaviour.
Note that the problem isnt there with Java look and feel.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Run the attached code
2.Press the ALT key
3.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class PaintTest extends JTree // or JTable or JList
{
public PaintTest()
{
super();
return;
}
public void paintComponent(Graphics g)
{
System.out.println("Painting ...");
super.paintComponent(g);
return;
}
public static void main(String args[])
{
try
{
UIManager.setLookAndFeel
(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e)
{}
PaintTest paintTest = new PaintTest();
JFrame frame = new JFrame("PaintTest");
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
frame.getContentPane().add(paintTest);
frame.setBounds(200, 200, 200, 200);
frame.setVisible(true);
return;
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
It is possible to work around this problem by adding a
KeyListener, flagging the ALT key presses and painting only
if it is not because of the ALT having been pressed.
Release Regression From : 1.3.1
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 164598)
======================================================================