RFR: JDK-8353755 : Add a helper method to Util - findComponent() [v2]

Phil Race prr at openjdk.org
Sun Nov 2 17:39:06 UTC 2025


On Thu, 23 Oct 2025 21:02:07 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 update

@TejeshR13 please review

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

PR Comment: https://git.openjdk.org/jdk/pull/27944#issuecomment-3478133739


More information about the client-libs-dev mailing list