fetch
Resolves the matched component and returns it as the T the query named, for driving the component's own API directly (e.g. a JTable's model, a JTree's selection, a JList's model). A query that named the type does not name it again:
val table = onNodeOfType<JTable>().fetch()Content copied to clipboard
Throws
if the query has no single target.
Resolves the matched component and returns it typed as R, for a query that named no type of its own, or that named a wider one than the component to be driven.
onNodeWithText("Save").fetch<JButton>().isDefaultCapableContent copied to clipboard
Throws
if the query has no single target, or if the target is not an R.