I am experiencing a strange behaviour with a FlowPane within (the center of) a BorderPane. 
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:
public class LayoutBugTest extends Application {
public static void main(String[] args) {
launch(args);
}
public void start(Stage stage) {
TextField tf1 = new TextField("");
TextField tf2 = new TextField("");
TextField tf3 = new TextField("");
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("Heading"));
box.setCenter(flow);
box.setStyle("-fx-border-width: 2px; -fx-border-color: black; -fx-border-radius: 1em; -fx-padding: 5px;");
VBox anyLayout = new VBox(5, new Label("Before"), box, new Label("After"));
Scene scene = new Scene(anyLayout);
stage.setScene(scene);
stage.show();
}
}
Did I miss something or is this a layout bug?