JComponent c2 = new JComponent(){};
comp.add(c1);
comp.add(c2);
comp.setSize(400, 400);
layout.layoutContainer(comp);
Rectangle b1 = c1.getBounds();
Rectangle b2 = c2.getBounds();
h.check(b1.x, 0, String.valueOf(b1.x));
h.check(b1.y, 0, String.valueOf(b1.y));