-
Bug
-
Resolution: Fixed
-
P3
-
7, 8, 9
-
b68
-
x86
-
windows_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8098711 | emb-9 | Semyon Sadetsky | P3 | Resolved | Fixed | team |
JDK-8197304 | 8u192 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8195489 | 8u172 | Unassigned | P3 | Resolved | Fixed | b03 |
JDK-8190096 | 8u162 | David Dehaven | P3 | Resolved | Fixed | b04 |
JDK-8168497 | 8u161 | Unassigned | P3 | Closed | Won't Fix | b01 |
JDK-8169779 | 8u152 | David Dehaven | P3 | Resolved | Fixed | b01 |
JDK-8185209 | 8u144 | David Dehaven | P3 | Resolved | Fixed | b31 |
JDK-8183066 | 8u141 | David Dehaven | P3 | Resolved | Fixed | b31 |
JDK-8173349 | 8u121 | David Dehaven | P3 | Resolved | Fixed | b32 |
JDK-8192352 | emb-8u161 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8169035 | 7u171 | Vivi An | P3 | Resolved | Fixed | b01 |
JDK-8168496 | 7u131 | Vivi An | P3 | Closed | Won't Fix | |
JDK-8200053 | openjdk7u | Unassigned | P3 | Resolved | Fixed | master |
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
If a Label control is configured with a mnemonic, the Alt/Key combination does not move focus to the text field configured in the "labelFor" property.
Instead the focus goes to the first menu.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Run the attached sample code.
2) Click on the “First name” text field.
3) Press Alt/L to move the focus to the “Last name” text field.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Focus should move to “Last name” text field instead of moving to menu “FirstMenu”.
ACTUAL -
Focus is not moved to “Last name” text field. Instead the focus is moved to menu “FirstMenu”.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package com.samples;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
public class Sample extends JDesktopPane{
JLabel firstLbl = new JLabel("First name");
JLabel lastLbl = new JLabel("Last name");
JMenuBar menuBar = new JMenuBar();
JTextField firstTxtFld = new JTextField(20);
JTextField lastTxtFld = new JTextField(20);
public Sample() {
boolean resizable = true;
boolean closeable = true;
boolean maximizable = true;
boolean iconifiable = true;
String title = "Frame Title";
JInternalFrame iframe = new JInternalFrame(title, resizable, closeable, maximizable, iconifiable);
// Set an initial size
int width = 200;
int height = 50;
iframe.setSize(width, height);
// By default, internal frames are not visible; make it visible
iframe.setVisible(true);
JPanel pane = new JPanel();
pane.setLayout(new FlowLayout());
pane.add(firstLbl);
pane.add(firstTxtFld);
pane.add(lastLbl);
pane.add(lastTxtFld);
firstLbl.setLabelFor(firstTxtFld);
firstLbl.setDisplayedMnemonic('F');
lastLbl.setLabelFor(lastTxtFld);
lastLbl.setDisplayedMnemonic('L');
iframe.getContentPane().add(pane);
iframe.setJMenuBar(menuBar);
JMenu m = new JMenu("FirstMenu");
//m.setMnemonic('i');
menuBar.add(m);
this.add(iframe);
}
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame();
frame.getContentPane().add(new Sample (), BorderLayout.CENTER);
frame.setSize(300, 300);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8098711 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8169035 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8169779 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8173349 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8183066 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8185209 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8190096 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8192352 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8195489 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8197304 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8200053 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Resolved
-
JDK-8168496 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Closed
-
JDK-8168497 With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
- Closed
- relates to
-
JDK-8173145 Menu is activated after using mnemonic Alt/Key combination
- Closed