Very often I design components in the Introjucer that need to change their look a bit depending on how they are used.
For example, I recently needed a volume/mute/solo speaker element with a small icon of the speaker. Now obviously this will have a different background design for every speaker, yet it will still have the same components and the same layout.
Or for example I'm selling a "lite" version of one of my audio plugins. In that version, I remove some sliders&buttons programmatically. But I also need to update the background layer to make sure there is no labels for non-existent GUI items.
And also for completly custom GUI controls (like a panner, for example), I often need different background layers. In case of the panner, for showing different speaker arrangements below the panning grid.
So to make my life easier, I introduced the "MultiPaint" jucer document. You can simply open up a regular jucer component c++ file in a text editor and in the XML change documentType="Component" to documentType="MultiPaint". Afterwards, you'll have a new text box on the Class tab in jucer, called "Paint Variants". In there, you put a comma-separated list of variants and then the Introjucer will show you one background tab for each variant, and generate paint code for all of them.
The only thing you then need to do to switch around the component's background at runtime is to declare a paintVariant String variable that is visible in the paint method.
Patch is attached.