JDK-4748780 : 1.4 REGRESSION: Pressing the ALT key causes JTree to repaint in Windows L&F
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2002-09-17
  • 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
Related Reports
Relates :  
Description

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) 
======================================================================

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

EVALUATION This is windows behavior to make the accelerators appear. ###@###.### 2002-10-18
18-10-2002