Start Menu in 2d game

Hello everyone.

My friend and I started to develop a little soccer game. We’re going by book Killer Game Programming in Java from O’Reilly. So far we got JFrame that has a JPanel. JFrame has disabled paint and we paint our own animation in JPanel step by step in a while loop (that’s all that stuff with timers, calculating sleep, repainting Image every time with new locations of objects…). Panel is

My problem is how to build a start menu in this game? I can’t use standart display of picture and event listeners couse repainting is turned off. Think drawing seperatly start menu in JFrame and then game animation in Jpanel isn’t the best way. Please direct me how this is done generally. Tnx to all.

Kova

only disable the reapint for that one JPanel, leave the rest of the Swing UI operating normally. Try to write your program so it does the right thing if the JPanel does get asked to paint for frequently than it normally would be.

OK tnx, will try that… though since was like that in the book it has to be disabled in JFrame. I’ll report resaults.

That worked, in main JFrame after just overrided paint(graphics g) method and put everything in it.