-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
6
-
x86
-
linux
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 ----------
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 ----------
- relates to
-
JDK-5047379 tooltips have extra space at the end of the message
- Resolved