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

15
LINES

< > BotCompany Repo | #1005075 // addActionListener - synonym of onEnter for JTextField

JavaX fragment (include)

1  
static void addActionListener(JTextField tf, final Runnable action) {
2  
  onEnter(tf, action);
3  
}
4  
5  
static void addActionListener(final JComboBox cb, final Runnable action) {
6  
  if (cb != null) swing {
7  
    cb.addActionListener(actionListener(action));
8  
  }
9  
}
10  
11  
static void addActionListener(final AbstractButton b, final Runnable action) {
12  
  if (b != null) swing {
13  
    b.addActionListener(actionListener(action));
14  
  }
15  
}

Author comment

Began life as a copy of #1001788

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005075
Snippet name: addActionListener - synonym of onEnter for JTextField
Eternal ID of this version: #1005075/5
Text MD5: 911f1253a06a0440d5a78b13a8bbaa3a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-06 23:05:08
Source code size: 426 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 540 / 561
Version history: 4 change(s)
Referenced in: [show references]