Overriding paint() makes the menus disappear

Hi,

I have a JFrame with a JMenu and some JPanels placed around, and they show up ok. However, when I override the paint() method these components won’t show up anymore. So what should I do to draw out the menu and the panels, and also be able to draw whatever else I want?

call super.paint() before doing anything else?

Kev

Yeah that’s it, I figured it out after writing the question :-[

Or override paintComponent instead of paint. For JComponents the default paint implementation takes care of painting the subcomponents too. paintComponent is the one to override if you just want to do some special painting of the component itself.