KeyEvent & Constant Field Values
in
Programming Questions
•
1 year ago
I don't understand if it's possible to create a KeyEvent this way:
- import java.awt.event.KeyEvent;
- int A_Z = 26;
- ArrayList<KeyEvent> ALFABET = new ArrayList<KeyEvent>(A_Z);
- ALFABET.add(0, (KeyEvent)(char(65)));
that gives this error:
Cannot cast from char to KeyEvent
is it possible to get the keyCode to assign to ALFABET?
Thank you for any kind of help!
1