Are you using the class called Window (or JWindow)? Don't. Use JFrame or, better still,
a dialogue. You will have to return something from the dialogue to tell its parent frame whether you want the menu visible or not.
Why do you want menus appearing and disappearing? That will give your display a very peculiar appearance.
Are you extending display classes? That is usually a bad idea; your program IS NOT A JFrame, but is HAS A JFrame. You should usually only use one frame per program; everything else is better as a dialogue.