I am trying to get a lot of JButtons to display on top of a background image of the world in a JFrame.
So far, I've tried a lot of things. I tried overwriting the paint function of the JFrame to drawImage the image of the world. But whenever I repainted, the buttons got painted very quickly and then covered by the background image.
I then tried to create a JLayeredPane. Here is an excerpt of the code:

Dimension layeredPaneSize = new Dimension(1025, 740);
JLayeredPane layeredPane = new JLayeredPane();

JButton myWorldButton = new JButton (big_world);
myWorldButton.setBounds (10, 10, 1000, 700);
layeredPane.add(myWorldButton, JLayeredPane.DEFAULT_LAYER, 0);

tmp1 = 0;
tmp2 = 0;
for (int s = 0; s < 5; ++s)
world[s].myButton.setBounds(tmp1,tmp2, 8, 8);
layeredPane.add(world[s].myButton, JLayeredPane.POPUP_LAYER, 0);
tmp1 = tmp1 + 10;
tmp2 = tmp2 + 10;

Checkbox less_than = new Checkbox (" <");

less_than.setBounds(20, 650, 10, 10);

layeredPane.add(less_than, JLayeredPane.MODAL_LAYER, 0);


And the only thing that happens is that the checkbox displays. Does anybody have any idea how I should proceed/what I'm doing wrong? Please let me know. Thanks