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

12
LINES

< > BotCompany Repo | #1007911 - componentPopupMenuItem - adds to the menu if it already exists

JavaX fragment (include)

static <A extends JComponent> A componentPopupMenuItem(A c, fS name, fO action) {
  componentPopupMenu(c, voidfunc(JPopupMenu menu) {
    addMenuItem(menu, name, action);
  });
  ret c;
}

static void componentPopupMenuItem(JComponent c, final JMenuItem menuItem) {
  componentPopupMenu(c, voidfunc(JPopupMenu menu) {
    addMenuItem(menu, menuItem);
  });
}

Author comment

Began life as a copy of #1006764

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1007911
Snippet name: componentPopupMenuItem - adds to the menu if it already exists
Eternal ID of this version: #1007911/4
Text MD5: 55a9fe835ec5da0baaeab490743dddaa
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-29 21:49:30
Source code size: 369 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 328 / 346
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1007911 & http://1007911.tinybrain.de