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