Make good menu

Hi all, i want make menu for my game, i say menu like option menu ecc ecc.
Now im using a modal JDialog so i can block current thread when i show my JDialog, but it dont work good…becouse when when i setVisible(true) i spend a few time to paint it, so i see a white JDialog for a moment.
I think the solution is show the dialog as soon as it is created, but if it si modal my thread is block.

How do you make a game menu?

Another possible solution is transalte jdialog out of screen, and show it, and when i would use it have only to tranlsate it in screen.
But when i show the jdialog out of screen, it has to be not modal or it block my thread, the problem is setModal(true) not work if it’s inovocated after show jdialog…

There are any solutions?

Maybe what you can try is to use a JPanel and place it on the the JLayerPane of the JFrame…

Maybe that would solve the problem?

Suggesting only… Not sure if that is the right solution

Are you doing the painting on the JDialog yourself? Are you sure it’s the cause for the white background? Maybe your game thread is takes too much processing power and you should suspend your game before opening the JDialog.