static void onFocusLeave(JComponent c, final Runnable action) { c.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent evt) { try { action.run(); } catch (Throwable e) { e.printStackTrace(); } } }); }
Began life as a copy of #1001788
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: | #1001825 |
| Snippet name: | onFocusLeave |
| Eternal ID of this version: | #1001825/1 |
| Text MD5: | 6c475b27330f1548840ed1edace33146 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-11-19 20:57:09 |
| Source code size: | 274 bytes / 11 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 838 / 1068 |
| Referenced in: | [show references] |