if (parent != container) throw new AWTError("invalid parent");
if (container != parent) throw new AWTError("BoxLayout can't be shared");
  public float getLayoutAlignmentX(Container parent)  {    if (parent != container)      throw new AWTError("invalid parent");        return 0;  }