There are three grids of buttons on my JFrame. Each of those grids has its own JPanel. Right now, the buttons are stored in ArrayLists and each one gets an actionListener and keyListener assigned to it through a for loop.

My problem is that the keys don't register until you click one of the buttons. How can I make the keys have the focus for the entire JFrame regardless of which grid they are in?

If you would like to see a certain portion of code, just specify which part and I will post it.