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

Swing's default behavior should be to display tooltips when window lacks focus.

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      When a swing window (such as a JFrame) is displayed on the user's desktop, but lacks interface focus, swing does not display tooltips when the mouse cursor hovers over the window. The constraint that the window must have interface focus for tooltips to be displayed is unnecessary and undesirable.

      JUSTIFICATION :
      The cost of spuriously displaying a tooltip that the user doesn't want to see is negligible - in most cases the user doesn't notice the tooltip, and in the few in which it blocks their view it is easily dismissed. By contrast, the failure to display a tooltip when it is desired is much greater - the user gets frustrated, impatient, and cannot be assumed to know that the reason the tooltip isn't displayed is because they have neglected to grant its window focus (usually requiring a click on the window's titlebar).

      I believe the resolution of issue 6178004 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178004) is unsatisfactory because it does not take this into account. Furthermore, the comment "I have checked the native(both Windows and Linux) and found that most of the applications dont show tooltips if they are unfocused" is not in and of itself a justification for making the default behavior focused-window-only.

      And, for what it's worth, of the applications open on my desktop right now, Firefox, Winamp, IntelliJ IDEA, Gaim, Acrobat Reader, and The GIMP all show tooltips while hovering over unfocused windows, whereas only Microsoft Outlook and Windows Explorer show tooltips only when holding interface focus.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Swing's default behavior should be to always display tooltips without regard to whether the window from which the tooltip being generated has focus. Should applications wish to only display tooltips when holding interface focus, this exceptional behavior should have to be specifically requested.

      CUSTOMER SUBMITTED WORKAROUND :
      None for JDK 5.0, not even the solution described in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178004 .

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: