I'm working on a simple sokoban game. I am using a JMenu which has 3 options: Reset board, Load board, and quit. Once the board is loaded the user should be able to use the keyboard to move around the game board. However, after the game is loaded, the keys do not work until I click the "Reset board" option on the menu (which is currently unimplemented and does nothing except a print statement). I can't figure out what's causing this strange behavior. Portions of the code are below. The Board class, which I've not included, implements the character movement functions.

Just to reiterate, if I "Load board" -> "Reset board", the keys work fine, but I shouldn't have to "Reset board" to get the keys to work.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org