Libraryless. Click here for Pure Java version (11142L/62K).
static <A extends JComponent> A componentPopupMenuItem(A c, S name, Runnable action) { componentPopupMenu(c, voidfunc(JPopupMenu menu) { addMenuItem(menu, name, action); }); ret c; } static void componentPopupMenuItem(JComponent c, JMenuItem menuItem) { componentPopupMenu(c, voidfunc(JPopupMenu menu) { addMenuItem(menu, menuItem); }); }
Began life as a copy of #1006764
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: | #1007911 |
Snippet name: | componentPopupMenuItem - adds to the menu if it already exists |
Eternal ID of this version: | #1007911/5 |
Text MD5: | 21f619f43f3a112077d4b645128c1ca3 |
Transpilation MD5: | af0c5ba1861733ae439bb9f58eafaad7 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2023-01-15 19:20:12 |
Source code size: | 368 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 685 / 777 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1017891 - componentPopupMenuItems - adds to the menu if it already exists |