Overriding paint(Graphics)
to not do anything if a flag is set will prevent the painting from happening; you can also add your own double buffering by overriding to draw to a image.
You can enable double buffering on a per swing JComponent basis using that component's setDoubleBuffered(boolean)
method, you don't need to do anything else if that's all you need.
Even if you disable painting at the top level component by overriding paint, it won't stop child components from painting if they are receiving events; you could replace the frame's contents with a static image ( created from calling paint with the graphics from a buffered image ).