i ran into the same problem making a game of battleship for a final project in class, and decided near the end that it would look cool to add pictures of the ships where they were placed, rather than just gray squares. needless to say after a few thousand lines of code without ever thinking about adding images, it was difficult to shoe-horn them in. and once i did they would disappear behind the main game board's frame when you clicked it to add another ship.
i found a great answer while searching google.
frame.setFocusableWindowState(false);
that one line of code did exactly what i wanted, making my main game board always in the background no matter what i added. very easy, very quick.
also, sorry for bumping an old post