RFR: JDK-8353755 : Add a helper method to Util - findComponent() [v3]
Tejesh R
tr at openjdk.org
Tue Nov 4 07:08:51 UTC 2025
On Mon, 3 Nov 2025 21:56:44 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> `findComponent(final Container container, final Predicate<Component> predicate)` is a useful utility method and thus added to` javax/swing/regtesthelpers/Util.java` instead of having redundant code in tests. It can be used to find a component by label name.
>>
>> PS: Existing `Util.findSubComponent()` finds component by class name but `findComponent()` can be used to search for a particular component by label name/title when there are multiple subcomponents of same type by applying a predicate logic.
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review changes: EDT check
Any reason for updating the test files with this PR ? I feel this PR should be restricted to Util file updates alone, updating the test files can be taken up separately.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27944#pullrequestreview-3414321097
More information about the client-libs-dev
mailing list