On Wed, 22 Oct 2025 22:02:42 GMT, Harshitha Onkar <[email protected]> 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.

This pull request has now been integrated.

Changeset: 35491038
Author:    Harshitha Onkar <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/354910381a9319723d43a6182269b5449c02a527
Stats:     54 lines in 1 file changed: 38 ins; 2 del; 14 mod

8353755: Add a helper method to Util - findComponent()

Reviewed-by: aivanov, tr

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

PR: https://git.openjdk.org/jdk/pull/27944

Reply via email to