svoid jPreemptEnterKey(final Component c, fO action) { swing { c.addKeyListener(new KeyAdapter { public void keyPressed(KeyEvent e) { if (e.getKeyCode() != KeyEvent.VK_ENTER || e.getModifiers() != 0) ret; e.consume(); callF(action); } }); } }
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: | 404 / 444 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |