On Wed, 3 May 2023 20:13:42 GMT, Marius Hanl <mh...@openjdk.org> wrote:
> This PR adds a new constructor to `GridPane` that accepts a `hgap` and a > `vgap`. > As also written in the ticket, this is a small enhancement to improve the > creation of a layout involving a `GridPane` without FXML. > In my experience, the `hgap` and the `vgap` are almost always set when > creating a layout with the `GridPane`, as a space between the content just > looks much better. > > This also fits well with other classes like `HBox` and `VBox`, which also > provide a constructor that accepts the spacing. Not related to these changes specifically, but why does GridPane adds a listener in the constructor getChildren().addListener((Observable o) -> requestLayout()); and VBox/HBox do not? ------------- PR Comment: https://git.openjdk.org/jfx/pull/1125#issuecomment-1533725376