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

10
LINES

< > BotCompany Repo | #1016722 // JMenuItem bindToComponent Test (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (7606L/53K).

1  
!7
2  
3  
p {
4  
  JDesktopPane desktop = jDesktopPane();
5  
  showFrame(desktop);
6  
  JInternalFrame f = addInternalFrame(desktop, "Test");
7  
  JMenuItem item = jMenuItem("Hello");
8  
  bindToComponent(item, r { print("Showing") }, r { print("Hiding") });
9  
  addMenu(f, "Menu", item);
10  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016722
Snippet name: JMenuItem bindToComponent Test (OK)
Eternal ID of this version: #1016722/2
Text MD5: 814e3c15aa0233bf0fe78ecbb4790683
Transpilation MD5: 563941cf6851bdaaea14aff78d9091d4
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-30 13:44:20
Source code size: 276 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 580 / 1153
Version history: 1 change(s)
Referenced in: [show references]