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

27
LINES

< > BotCompany Repo | #1005735 - addMenuItem - add JMenuItem to JMenu/JPopupMenu/Menu

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3411L/20K).

static void addMenuItem(JPopupMenu menu, S text, O action) {
  menu.add(jmenuItem(text, action));
}

static void addMenuItem(JPopupMenu menu, JMenuItem menuItem) {
  menu.add(menuItem);
}

static void addMenuItem(JMenu menu, S text, O action) {
  menu.add(jmenuItem(text, action));
}

static void addMenuItem(Menu menu, S text, O action) {
  menu.add(menuItem(text, action));
}

static void addMenuItem(JMenu menu, JMenuItem menuItem) {
  menu.add(menuItem);
}

svoid addMenuItem(JMenuBar menuBar, S text, Runnable action) {
  addMenuItem(menuBar, jmenuItem(text, action));
}

svoid addMenuItem(JMenuBar menuBar, JMenuItem menuItem) {
  addDirectMenuItem(menuBar, menuItem);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005735
Snippet name: addMenuItem - add JMenuItem to JMenu/JPopupMenu/Menu
Eternal ID of this version: #1005735/13
Text MD5: 2003b65d23bde7c37f09f23d12c6bc28
Transpilation MD5: 51b48688aa509b21e456b02595f152e2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-06 13:26:17
Source code size: 702 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 481 / 508
Version history: 12 change(s)
Referenced in: #1006654 #1010361 #1015291