title: JavaFX, can't get GridPane to fit in the center of BorderPane
body: <p>I'm working on a sudoku application but I'm having an issue which hinders my advancement. What I'm trying to do is to make this sudoku-board that I have created with loops, which adds a Label into a StackPane and that StackPane goes into it's designated spot into the GridPane. So I'm trying to force this board have a set size and not grow beyond that point. </p>
  
  <p>I've spent the whole evening researching and trying different things, for example putting the GridPane into an AnchorPane and trying to fit the AnchorPane in the center of BorderPane, but it always seems to exceed outside of the window, when you use too many rows and columns for the sudoku board.</p>
  
  <p>What I'm trying to do is to get a set size for all the boards, so if needed it gets stretched to that point, or if needed it gets shrinked. The picture attached is using a BorderPane with a GridPane put in the middle. You can see that the 16x16 fits perfectly while the 25x25 just goes outside the window.</p>
  
  <p>Help would be highly appreciated.</p>
  
  <p>Picture of how the window looks like when trying to create a 25x25.</p>
  
  <p><a href="http://i.imgur.com/BrJrpiY.png" rel="nofollow">http://i.imgur.com/BrJrpiY.png</a></p>
  
  <p>Picture of how the window looks like when trying to create a 16x16.
  This is also using insets to push it more towards the top so it doesn't look so much out of place.</p>
  
  <p><a href="http://i.imgur.com/7a0QJx8.jpg" rel="nofollow">http://i.imgur.com/7a0QJx8.jpg</a></p>