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


< > BotCompany Repo | #1028020 - JMenuItem bindToComponent Test with JTattoo fix attempt (doesn't work)

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

Uses 1177K of libraries. Click here for Pure Java version (7632L/53K).


static JMenuItem item;

p {
  JDesktopPane desktop = jDesktopPane();
  JInternalFrame f = addInternalFrame(desktop, "Test");
  item = jMenuItem("Hello");
  embedded void attachListener() {
    bindToComponent(item, r { print("Showing") }, r {
      print("Hiding, attaching listener again");
  addMenu(f, "Menu", item);

Author comment

Began life as a copy of #1016723

download  show line numbers  debug dex   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028020
Snippet name: JMenuItem bindToComponent Test with JTattoo fix attempt (doesn't work)
Eternal ID of this version: #1028020/3
Text MD5: 91e7f494dbc7b47fb0935128df4d9136
Transpilation MD5: 1b48684a43e155188c5883fa51017da5
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-03 20:55:25
Source code size: 440 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 36 / 73
Version history: 2 change(s)
Referenced in: [show references]

Formerly at &