title: JavaFX: Layout problem with BorderPane - bug or user error?
body: <p>I am experiencing a strange behaviour with a FlowPane within (the center of) a BorderPane. <a href="https://i.stack.imgur.com/np3j4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/np3j4.png" alt="Example" /></a></p>
  <p>If I enlarge the width of the window or reduce it, everything is fine. It is just a narrow width +- 5 pixels that causes this effect. Code to reproduce:</p>
  <pre><code>public class LayoutBugTest extends Application {
  
      public static void main(String[] args) {
          launch(args);
      }
      
      public void start(Stage stage) {
          TextField tf1 = new TextField(&quot;&quot;);
          TextField tf2 = new TextField(&quot;&quot;);
          TextField tf3 = new TextField(&quot;&quot;);
          tf1.setPrefColumnCount(20);
          tf2.setPrefColumnCount(10);
          tf3.setPrefColumnCount(10);     
          FlowPane flow = new FlowPane(10,10, tf1,tf2,tf3);
          
          BorderPane box = new BorderPane();
          box.setTop(new Label(&quot;Heading&quot;));
          box.setCenter(flow);
          box.setStyle(&quot;-fx-border-width: 2px; -fx-border-color: black; -fx-border-radius: 1em; -fx-padding: 5px;&quot;);
          
          VBox anyLayout = new VBox(5, new Label(&quot;Before&quot;), box, new Label(&quot;After&quot;));
          
          Scene scene = new Scene(anyLayout);
          stage.setScene(scene);
          stage.show();
      }
  
  }
  </code></pre>
  <p>Did I miss something or is this a layout bug?</p>