Java 1.5 may have broken getKeyStroke(char)
Brought to you by:
peastman
new Shortcut('q') no longer works, because the
constructors have been changed in Java 1.5. Changing
the code in Shortcut(char, modifiers) to use
getKeyStroke(new Character(c)...) is a partial fix, but
even then I can't get the menu item to actually work.
Logged In: YES
user_id=964484
Comments: Going back to Java 1.4 seems to fix this... But I
also note that all my testing under 1.5 involved new
Shortcut('n') instead of new Shortcut('N'). So I will have
to retry it; the "new Character" thing may have been a
mistake anyway.
Logged In: YES
user_id=74743
I agree that "new Character(c)" looks like the correct thing to do.
Unfortunately, it doesn't work. I don't know why, but I suspect it may be a
Swing bug. I'll investigate further, but for the moment I'm leaving this as
is, since it at least works with upper case letters.