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

Tooltips do not display accelerator key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: client-libs

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Red Hat Enterprise Linux WS 4
      kernel: 2.6.9-42.0.8.ELsmp
      i686

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      KDE 3.3.1-6.RHEL4

      A DESCRIPTION OF THE PROBLEM :
      Mnemonics set on JButtons are not displayed in tooltips. In previous versions the tooltip for a component was appended with the accelerator key. For instance, if the mnemonic of a JButton was 'C', and the tooltip text was "Text", the displayed tooltip would read "Text <Alt-C>".

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The accelerator key to be displayed in the tooltip.
      ACTUAL -
      The accelerator key was not displayed in the tooltip.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      public class NoAccel extends JFrame
      {
          public JButton aButton;
          public NoAccel()
          {
              aButton = new JButton();
              aButton.setText("Close");
              aButton.setMnemonic('C');
              aButton.setToolTipText("Tool Tip Text");
              getContentPane().add(aButton);
              pack();
              setVisible(true);
          }
          public static void main(String[] args)
          {
              new NoAccel();
          }
      }
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Imported:
                Indexed: