When would one use the KeyStroke class?
I just finished reading about implementing key listeners and it talked about using KeyEvent to differentiate between the keys on a keyboard. As I started reading about the focus subsystem, the class KeyStroke came up. I read the API for it ( KeyStroke (Java 2 Platform SE v1.4.2) ) and it's parent AWTKeyStroke ( AWTKeyStroke (Java 2 Platform SE v1.4.2) ). The KeyStroke class is just full of factory methods that don't seem beneficial at all to me and the AWTKeyStroke makes no sense to me. :S I guess what I'm asking is, what is the KeyStroke class? When/Why should one use it? Thanks in advance!