1 | static void addActionListener(JTextField tf, final Runnable action) {
|
2 | onEnter(tf, action); |
3 | } |
4 | |
5 | static void addActionListener(final JComboBox cb, final Runnable action) {
|
6 | if (cb != null) swing {
|
7 | cb.addActionListener(actionListener(action)); |
8 | } |
9 | } |
10 | |
11 | static void addActionListener(final AbstractButton b, final Runnable action) {
|
12 | if (b != null) swing {
|
13 | b.addActionListener(actionListener(action)); |
14 | } |
15 | } |
Began life as a copy of #1001788
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1005075 |
| Snippet name: | addActionListener - synonym of onEnter for JTextField |
| Eternal ID of this version: | #1005075/5 |
| Text MD5: | 911f1253a06a0440d5a78b13a8bbaa3a |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-11-06 23:05:08 |
| Source code size: | 426 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 940 / 972 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |