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

The ToolTip of Swing doesn't disappear.

    XMLWordPrintable

    Details

      Description

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

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      The ToolTip text doesn't disappear when the test program is executed. this can be reporduced when the cursor is moved quickly downward over the ToolTip above the label.

      When the cursor moves out of the label (not over the tooltip), the tooltip disappears.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Test {
        public static void main(String[] args) {
          ToolTipManager manager = ToolTipManager.sharedInstance();
          manager.setInitialDelay(0);
          manager.setDismissDelay(10000);
          manager.setReshowDelay(0);

          JLabel label = new JLabel("ã??ã?¹ã??") {
            public Point getToolTipLocation(MouseEvent event) {
              Dimension d = event.getComponent().getSize();
              Point p = new Point(0, d.height);
              return p;
            }
          };
          label.setBackground(Color.RED);
          label.setOpaque(true);
          label.setBounds(0, 0, 45, 20);
          label.setToolTipText("ã?¦ã??ã?¨");
          
          JFrame frame = new JFrame();
          frame.getContentPane().setLayout(null);
          frame.add(label);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(400, 500);
          frame.setVisible(true);
        }
      }
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexp Alexander Potochkin (Inactive)
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: