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

11
LINES

< > BotCompany Repo | #1001825 // onFocusLeave

JavaX fragment (include)

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();
      }
    }
  });
}

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