Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1001825 // onFocusLeave

JavaX fragment (include)

1  
static void onFocusLeave(JComponent c, final Runnable action) {
2  
  c.addFocusListener(new FocusAdapter() {
3  
    public void focusLost(FocusEvent evt) {
4  
      try {
5  
        action.run();
6  
      } catch (Throwable e) {
7  
        e.printStackTrace();
8  
      }
9  
    }
10  
  });
11  
}

Author comment

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: 594 / 824
Referenced in: [show references]