By default, FEST-Swing supports looking up components by name, type and custom search criteria. To specify custom search criteria, users need to provide an implementation of GenericTypeMatcher or ComponentMatcher.
To save development time, FEST-Swing provides some common-use component matchers in the package org.fest.swing.core.matcher:
Matcher |
Description |
|---|---|
|
Matches a |
|
Matches a |
|
Matches a |
|
Matches a |
|
Matches a |
Example
The following example shows how to find and click a JButton with name "cancel" and text "Cancel", in a JFrame using a JButtonMatcher: