From: Barry G. <bar...@cs...> - 2001-12-18 08:54:01
|
Hi, Swing's JMenuItem has a constructor which takes a string and an int. It can be used like this: JMenuItem("Argh!", "A") where the "A" is a shortcut character. I have tried to do this in jpython like this: from java.lang import * shortcutChar = Character.getNumericValue(String("A").charAt(0)) jmi = JMenuItem("Argh!", shortcutChar) The values returned in shortcutChar are wrong, for example "A" and "a" both give the value 10. Any one knows what's up? I have tried plain: jmi=JMenuItem("Argh!", "A") but that gets rejected. Thanks -Barry |