Hi. I have a simple JFrame with a borderlayout. A menubar is added at North and a panel is added at centre. Most of the time it works as it should but sometimes the panel appears behind the menubar. I don't understand why this only happens sometimes. Can anyone give me some clue?