Losing Focus?
So I'm messing around with a program that takes in keyboard input, (the arrow keys in my case) then moves a square around. It worked perfectly until I added a new Panel that contained some simple menu buttons, one of which starts my animation timer.
Basically, I have Timer - animation - which has the actionEvent which controls the square depending on whether booleans (right, left, up, down) are true or false. The keyPressed/keyReleased events will toggle the booleans. I then wanted a button that started the animation timer as opposed to it just starting right when the window pops up. I added the button, but then when I press it, The game panel (with the square in it) seems to loose focus of what the keyboard is doing and can't read my input. I'm super confused, becuase I Printed out whether the Panel had focus or not, and it returns true. I've also set the panel focusable(true) a second time when the button is pressed.
Any ideas?
I'll clarify anything up if need-be, I tried keeping it short and probably skipped over a bunch of stuff.
Thanks,
Phil

