RFR: 8307208: Add GridPane constructor that accepts hGap and vGap values

Marius Hanl mhanl at openjdk.org
Wed May 3 21:14:23 UTC 2023


On Wed, 3 May 2023 20:46:16 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> 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?

I don't think it is necessary. If you actually look at the `children` list it already takes care about layouting stuff and more. So requesting it here for every change seems wrong. But this should be tested carefully.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1125#issuecomment-1533754981


More information about the openjfx-dev mailing list