Пример #1
0
  private void updateBounds(MyPoint p) {

    if (bounds == null) {
      bounds = AwtFactory.prototype.newRectangle();
      bounds.setBounds((int) p.getX(), (int) p.getY(), 0, 0);
    }

    if (Math.abs(p.getX()) > largestCoord) largestCoord = Math.abs(p.getX());
    if (Math.abs(p.getY()) > largestCoord) largestCoord = Math.abs(p.getY());

    bounds.add(p.getX(), p.getY());
  }