title: How to add KeyListener to JComponent when mouse is entered?
body: <p>I have created custom button class which extends <code>JComponent</code> and want to add <code>KeyListener</code> on <code>mouseEntered</code> event (and later remove on <code>mouseExited</code>). So my goal is - when the mouse enters this <code>JComponent</code> - then if I press Enter - some code will be executed, related to only this button. How can I do that?</p>