I'm relatively new to Juce. It's a really nice library. I wanted to use a simple “splitter window” kind of component but the StretchableLayout didn't work quite like I wanted. So I wrote one for myself. I'm posting this SplitComponent (attached files) in case it's of any use to anyone else. There are some notes in the header file. I've only used it on Windows.
I debated whether to include “panel” components by default on each side, but ended up not. So if you want to add a child to the SplitComponent that tries to take up the whole area of its parent, you need to enclose it in a “dummy” component panel first. (I could have create a special PanelComponent for this, but a plain old Component seems to work fine.) Also, I borrowed the idea of gravity from the wxWidgets splitter window.
I imagine that this might work well by putting some sort a resizeable layout component on either side. For example, this one I came across: http://www.juce.com/forum/topic/resizablelayout . I haven't tried that yet but probably will.
The split bar in the middle paints itself using drawStretchableLayoutResizerBar() so it fits in with the standard look-and-feel. One thing I noticed is that if you want to create your own new component to extend Juce, it won't necessarily work with the look-and-feel because the look and feel class only knows about the standard components. I understand the reason for doing it that way---so that the look and feel author can have everything in one place to work with and add new ones. But it might be nice for an author of a new component to have a way to add on to that. (Perhaps extended components can register and then provide drawing functions for known standard look-and-feel types. Not that I have a need for it at the moment, though. Just a thought.)
Jim