So, I was trying to make a rectangle move with a KeyEvent (KeyListener) and whenever I try to hit the key, the rectangle doesn\'t move.
KeyEvent
KeyListener
The
You should add your listener in the mainDraw class, not your mainFrame.
It's a good practice not to handle key and mouse events in Frames and Windows.
o/