I've just managed to get KeyListener to work in an empty application, but then I tried to implement it in my application and it simply doesn't work, no matter how much I enter keys!
A friend told me it's because I have buttons (JButton) on the application (and I implement the actionPerformed method,) can anyone explain to me why this is happening (and how to fix it) ?
EDIT:- Yes, the problem is about focus, and I found the solution in some forums, and the solution is very simple. It`s by adding: setFocusable(true); after, setVisible(true); in the class that extends JFrame.