JDK-8067348 : EDT/GUI is stalled for some seconds if ToolTipManager's initial delay is 0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u71,8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2014-11-29
  • Updated: 2015-07-22
  • Resolved: 2015-06-08
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
C:\Dokumente und Einstellungen\Administrator>ver

Microsoft Windows [Version 5.2.3790]


EXTRA RELEVANT SYSTEM CONFIGURATION :
Running within virtual environment on VMWare Workstation 10.0.4 build-2249910

A DESCRIPTION OF THE PROBLEM :
That issue does not happen on JDK6 nor on JDK8

REGRESSION.  Last worked in version 6u45

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a simple Swing GUI which contains a JCheckBox with a tool tip. Set the initial delay of the ToolTipManager to zero. Start the Swing GUI and try to select the JCheckBox. Notice that the JCheckBox is not selected immediately. It takes a few seconds before it gets selected. Consequtively selections/deselection work immediately. Further notice that it takes a few seconds before the tool tip is displayed (in constrast to the settings within the ToolTipManager). If the tooltip was visualized once, consequtively visualizations work immediately. 

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Clicking with the mouse on the JCheckBox should immediately select the Check Box.
ACTUAL -
The JCheckBox is not selected immediately.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Not applicable

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.GridBagLayout;

import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;

public class Swing {
	private static void createAndShowGUI() {
		ToolTipManager.sharedInstance().setInitialDelay(0);
		ToolTipManager.sharedInstance().setDismissDelay(10000);

		JFrame.setDefaultLookAndFeelDecorated(true);

		JFrame frame = new JFrame("HelloWorldSwing");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		JPanel panel = new JPanel(new GridBagLayout());

		JCheckBox checkBox = new JCheckBox("test");
		checkBox.setToolTipText("Tooltip");

		panel.add(checkBox);
		frame.add(panel);

		frame.setPreferredSize(new Dimension(300, 300));

		frame.pack();
		frame.setVisible(true);
	}

	public static void main(String[] args) {
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				createAndShowGUI();
			}
		});
	}
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Not known


Comments
It's exact duplicate of JDK-8024858. The problem is in video driver.
08-06-2015

Reproducible with 9 on Windows Server 2008 R2 in virtual machine running inside VirtualBox: The checkbox is highlighted when mouse hovers it. It takes a second or two for the tick to appear in the checkbox. After that, everything goes well without delays and tooltip appears immediately as soon as mouse enters the checkbox. The problem could be related to virtual environment yet I don't think it really is. I cannot reproduce this issue in a VM running Windows 8.1: the tooltip appears immediately just like on the Windows 7 running on hardware. Both Windows 8.1 and Windows 7 run with DWM but Server doesn't have DWM - it uses Windows Classic interface. At the same time, the issue is not reproduced in Windows 7 in Windows Classic or Basic themes on real hardware.
12-12-2014