public static boolean isWithin(Rectangle aRectangle, Point2D aPoint) {
    return
        (aPoint.getX() > aRectangle.getX()) && (aPoint.getX() < aRectangle.getX() + aRectangle.getBounds().width)
        &&
        ((aPoint.getY() > aRectangle.getY()) && (aPoint.getY() < aRectangle.getY() + aRectangle.getBounds().height));
  }
public static boolean isWithin(Rectangle aRectangle, Point2D aPoint)