Repaint without parent repaint

If your component is transparent then you'll have to repaint the parent or it won't know how to compositie the child's background. If the background of the child doesn't change can you set the child to opaque and simply fill it with the same colour as the parent?