Пример #1
0
  @Override
  public void mouseRelease(int x, int y, int button) {
    super.mouseRelease(x, y, button);
    x -= bounds.x;
    y -= bounds.y;

    if (focus != null) {
      focus.mouseRelease(x, y, button);
      focus = null;
    } else {
      for (Widget child : children) {
        if (child.getBounds().contains(x, y)) {
          child.mouseRelease(x, y, button);
          return;
        }
      }
    }
  }