Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6296449

Tooltip does not always hide when it should

XMLWordPrintable

    • x86
    • windows_2000, windows_xp

      FULL PRODUCT VERSION :
      java version "1.5.0_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
      Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 2000

      A DESCRIPTION OF THE PROBLEM :
      Build a window with a single button and some space around it (a flow layout).
      Enter the button from above, stop and wait for the tooltip.

      Move outside the button so that the mouse won't pass over the tooltip. The tooltip is hidden immediatly.

      Move over the tooltip so that you get outside the button as well... the tooltip won't be hidden until the tooltip manager times out. In the example I provided, the tooltip won't be hidden at all.

      This is related to bug 4592902 and to bug 4413412 as well (that is, I think they problem may be that the control associated to the tooltip won't trigger the mouseExited event and thus the tooltip would not close).



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JButton;
      import javax.swing.JFrame;
      import javax.swing.JPanel;
      import javax.swing.ToolTipManager;
      import javax.swing.WindowConstants;


      public class TooltipTest {
        public static void main(String[] args) {
          ToolTipManager.sharedInstance().setInitialDelay(0);
          ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE);
          
          JPanel panel = new JPanel();
          JButton button = new JButton("Test button");
          button.setToolTipText("Tooltip");
          panel.add(button);
          
          JFrame frame = new JFrame("Test");
          frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
          frame.setContentPane(panel);
          frame.setSize(400, 400);
          
          frame.setVisible(true);
        }
      }
      ---------- END SOURCE ----------
      ###@###.### 2005-07-13 18:14:48 GMT

            Unassigned Unassigned
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: