This question arose when an anonymous user downvoted an answer of mine involving KeyListeners and suggested the use of Key Bindings instead. This anonymous user informed me that the KeyListener interface was an old AWT solution and should not be used.
However, I don't know if I should trust that information completely. I have researched both on various websites, oracle included, and found nothing regarding the functionality of KeyListeners or Key Bindings. I am aware of the fact that the two perform similar tasks, but am unsure of exactly what goes on "behind the scenes", so to speak.
I'm kind of leaning towards using Key Bindings in future projects, simply because I acquired research suggesting that the KeyListener interface required that the component in question have focus while Key Bindings did not. But, I am confused. Why is this so? How are Key Bindings triggered differently than KeyListeners?
P.S. I'm pretty sure this is a rarity, but are there some circumstances where using KeyListeners is more appropriate?