AbstractAction « Event « Java Swing Q&A





1. AbstractAction and Mnemonics    coderanch.com

3. How to get the key code for a character (mnemonic in AbstractAction)    coderanch.com

Thanks for your answer, but I already know that. What I would like to know, if I have a character, like 'N', how do I get its key code; that is, KeyEvent.VK_N. I don't know the character at compile-time; it is read from a file, so the code has to be generic. It should be without any ASCII magic, only by ...

4. [newbie] AbstractAction fun...    coderanch.com

This is an object that is intended to change the color of a UI object. Can anyone guess why the following code is giving errors? How would I implement it as part of a program that "listens for (user-generated) events such as mouse clicks and button clicks? import java.awt.*; import javax.swing.*; public class ColorAction extends AbstractAction { public ColorAction (String name, ...