title: "Rectangle cannot be converted to bounds" using rectangle.intersect()?
body: <p>So I am passing double values from a rectangle to see if it intersects with a different rectangle.  I pass the attribute values (x, y, w, h) as arguments to the function, then create a rectangle within it and set the argument as its attributes.  I then I test it using the <code>rectangle.intersects(rect)</code> to see if they overlap.  The code is below.</p>
  
  <p><strong>THE PROBLEM:</strong>  The line <code>inputRectangle.intersects(scannedRectangle);</code> is giving an error that says <code>"Incompatible types: Rectangle cannot be converted to bounds</code>.</p>
  
  <p>A Google and SO search had no results for that error.</p>
  
  <p>How am I going about this incorrectly?  Thanks </p>
  
  <pre><code>import javafx.scene.shape.Rectangle;
  -----------^^^^^^^^^^^^^^^^------------
  
  public boolean isIntersectingNode(double inputX, double inputY, double inputWidth, double inputHeight)
  {
  
      Rectangle inputRectangle = new Rectangle(inputX, inputY, inputWidth, inputHeight);
      double newX = 20, newY = 20, newW = 20, newH = 20;
  
      Rectangle scannedRectangle = new Rectangle(newX, newY, newW, newH);
  
      return inputRectangle.intersects(scannedRectangle);  &lt;&lt;&lt;&lt;&lt;&lt;&lt;ERROR HERE
  
  }
  </code></pre>
  
  <p>NOTE:  I simplified the code somewhat.  But no matter how I change the code, the <code>scannedRectangle</code> segment in the function is giving that error.</p>