-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.3.0
-
generic
-
generic
This is actually a J2SE bug.
Elizabeth
Name: boT120536 Date: 12/04/2000
J2EE (build 1.3.0-C)
1. Run the following program.
2.
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
public class I18NBug extends JFrame {
public I18NBug() {
setTitle("I18NBug");
setBounds(30, 30, 600, 300);
JMenuBar mb = new JMenuBar();
makeMenu(mb);
setJMenuBar(mb);
}
public void makeMenu(JMenuBar mb) {
JMenu menu = new JMenu("Menu");
JMenuItem prItem = null;
prItem = new JMenuItem("Cancel");
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Cancel!");
}
};
prItem.addActionListener(al);
Locale currentLocale = new Locale("fr","FR");
setLocale(currentLocale);
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
prItem.setAccelerator(ks);
menu.add(prItem);
mb.add(menu);
}
public static void main(String[] args) {
I18NBug w = new I18NBug();
w.setVisible(true);
}
}
3. Since the text string for VK_ESCAPE is supplied by Java, it should use
French when the locale is set to France.
(Review ID: 110263)
======================================================================
elizabeth.williams@eng 2000-12-21
Elizabeth
Name: boT120536 Date: 12/04/2000
J2EE (build 1.3.0-C)
1. Run the following program.
2.
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
public class I18NBug extends JFrame {
public I18NBug() {
setTitle("I18NBug");
setBounds(30, 30, 600, 300);
JMenuBar mb = new JMenuBar();
makeMenu(mb);
setJMenuBar(mb);
}
public void makeMenu(JMenuBar mb) {
JMenu menu = new JMenu("Menu");
JMenuItem prItem = null;
prItem = new JMenuItem("Cancel");
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Cancel!");
}
};
prItem.addActionListener(al);
Locale currentLocale = new Locale("fr","FR");
setLocale(currentLocale);
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
prItem.setAccelerator(ks);
menu.add(prItem);
mb.add(menu);
}
public static void main(String[] args) {
I18NBug w = new I18NBug();
w.setVisible(true);
}
}
3. Since the text string for VK_ESCAPE is supplied by Java, it should use
French when the locale is set to France.
(Review ID: 110263)
======================================================================
elizabeth.williams@eng 2000-12-21