title: JavaFX: Setting a border within a rectangle to keep the width and height
body: <p>So, I have a grid of rectangles in my scene and I want to give it a border to visually seperate it to the others. I am currently using <code>grid.setGridLinesVisible(true);</code> and that works fine, but I am sure this isn't supposed to be used for that.</p>
  
  <p>I tried setting a border with <code>nodes[j][i].setStroke(Color.BLACK);</code> and this works too, but now my whole grid is getting a lot bigger because it's drawing the border on the outside of the rectangle and therefore resizing it.</p>
  
  <p>Is there a way to draw a border/stroke inside of a rectangle to keep the transformation?
  I already looked up the <a href="https://docs.oracle.com/javase/8/javafx/api/javafx/scene/shape/Rectangle.html" rel="nofollow noreferrer">documentation</a> but there isn't such a function.</p>
  
  <p>Thanks for the help!</p>