*/
public Bounds getPreferredBounds() {
if (components.isEmpty()) {
return super.getPreferredBounds();
}
Bounds b = new Bounds(Integer.MAX_VALUE, Integer.MAX_VALUE, 0, 0);
for (Component c : components) {
Bounds bc = c.getPreferredBounds();
b.x = Math.min(b.x, bc.x);
b.y = Math.min(b.y, bc.y);
b.width = Math.max(b.width, bc.x + bc.width - b.x);
b.height = Math.max(b.height, bc.y + bc.height - b.y);
}