Closed leewyatt closed 1 month ago
Changing separator properties causes the same components to be added multiple times to fieldsBox and getChildren(), resulting in a java.lang.IllegalArgumentException: Children: duplicate children added error.
fieldsBox
getChildren()
java.lang.IllegalArgumentException: Children: duplicate children added
InvalidationListener buildViewListener = it -> buildView(); picker.hoursSeparatorProperty().addListener(buildViewListener); picker.minutesSeparatorProperty().addListener(buildViewListener); picker.secondsSeparatorProperty().addListener(buildViewListener); buildView(); private void buildView() { // ... fieldsBox.getChildren().addAll(hourField, hoursSeparator, minuteField, minutesSeparator, secondField, secondsSeparator, millisecondField); // ... getChildren().add(box); }
Changing separator properties causes the same components to be added multiple times to
fieldsBox
andgetChildren()
, resulting in ajava.lang.IllegalArgumentException: Children: duplicate children added
error.