1 | svoid jPreemptEnterKey(final Component c, fO action) {
|
2 | swing {
|
3 | c.addKeyListener(new KeyAdapter {
|
4 | public void keyPressed(KeyEvent e) {
|
5 | if (e.getKeyCode() != KeyEvent.VK_ENTER || e.getModifiers() != 0) ret; |
6 | e.consume(); |
7 | callF(action); |
8 | } |
9 | }); |
10 | } |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1016942 |
| Snippet name: | jPreemptEnterKey - prevent normal function |
| Eternal ID of this version: | #1016942/2 |
| Text MD5: | b812411e3932b503981631995d637970 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-09 13:01:30 |
| Source code size: | 300 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 636 / 673 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |