1 | static JButton findButton(Component c, S name) {
|
2 | for (JButton b : childrenOfType(c, JButton.class)) |
3 | if (eq(b.getText(), name)) ret b; |
4 | for (JButton b : childrenOfType(getFrame(c), JButton.class)) |
5 | if (eq(b.getText(), name)) ret b; |
6 | null; |
7 | } |
8 | |
9 | static JButton findButton(Component c) {
|
10 | ret childOfType(c, JButton.class); |
11 | } |
Began life as a copy of #1006620
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007248 |
| Snippet name: | findButton - find JButton by its text |
| Eternal ID of this version: | #1007248/4 |
| Text MD5: | 829d65abee7a966d6501d1f15a0daff1 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-14 01:01:52 |
| Source code size: | 341 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 859 / 948 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |