In my version Julian kindly put this in the source code…
[code]void ResizableWindow::addChildComponent (Component* const child, int zOrder)
{
/* Agh! You shouldn’t add components directly to a ResizableWindow - this class
manages its child components automatically, and if you add your own it’ll cause
trouble. Instead, use setContentComponent() to give it a component which
will be automatically resized and kept in the right place - then you can add
subcomponents to the content comp. See the notes for the ResizableWindow class
for more info.
If you really know what you're doing and want to avoid this assertion, just call
Component::addChildComponent directly.
they are deliberately there cause you should use setContentComponent instead. Cause the window buttons are child and so, hacking in other components may cause trouble to how the window is handled.
Better to make a generic Component of your own, add you child to it, and then add the whole Component as “content-component” of the resizable window.
I had deleted the Jul’ comments. It stands the same in my sources.
In fact i just added components to a class, that inheritates from DocumentWindows : I use setContentComponent() AND addAndMakeVisible() stuff to make a customized Documentwindow.