code: public void setArea(int minX, int minY, int maxX, int maxY)
      {
          this.minX = Math.min(minX, maxX);
          this.minY = Math.min(minY, maxY);
          this.maxX = Math.max(maxX, minX);
          this.maxY = Math.max(maxY, minY);
      }
docs: Allows cursor to move only inside the specified area. The cursor location will not exceed this area.
  
  @param minX The minimal x.
  @param minY The minimal y.
  @param maxX The maximal x.
  @param maxY The maximal y.