Looks like an ambitious project!

Well, this is how it decides how to resize:

[code]void ResizableBorderComponent::updateMouseZone (const MouseEvent& e) throw()

{

int newZone = 0;

```
if (ResizableBorderComponent::hitTest (e.x, e.y))
{
if (e.x < jmax (borderSize.getLeft(), proportionOfWidth (0.1f)))
newZone |= zoneL;
else if (e.x >= jmin (getWidth() - borderSize.getRight(), proportionOfWidth (0.9f)))
newZone |= zoneR;
if (e.y < jmax (borderSize.getTop(), proportionOfHeight (0.1f)))
newZone |= zoneT;
else if (e.y >= jmin (getHeight() - borderSize.getBottom(), proportionOfHeight (0.9f)))
newZone |= zoneB;
}
```

[/code]

So in a decent-sized box, the diagonal hit boxes would be 10% of the width or height, which is normally plenty. I guess in very small ones it could be a bit smarter and use a bigger percentage. Something like this:

```
if (ResizableBorderComponent::hitTest (e.x, e.y))
{
if (e.x < jmax (borderSize.getLeft(),
proportionOfWidth (0.1f),
jmin (10, proportionOfWidth (0.33f))))
newZone |= zoneL;
else if (e.x >= jmin (getWidth() - borderSize.getRight(),
proportionOfWidth (0.9f),
getWidth() - jmin (10, proportionOfWidth (0.33f))))
newZone |= zoneR;
if (e.y < jmax (borderSize.getTop(),
proportionOfHeight (0.1f),
jmin (10, proportionOfHeight (0.33f))))
newZone |= zoneT;
else if (e.y >= jmin (getHeight() - borderSize.getBottom(),
proportionOfHeight (0.9f),
getHeight() - jmin (10, proportionOfHeight (0.33f))))
newZone |= zoneB;
}
```

(that’s completely untested, BTW)