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

14
LINES

< > BotCompany Repo | #1007285 // onResize

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

Libraryless. Click here for Pure Java version (4719L/26K).

static <A extends Component> A onResize(A c, Runnable r) {
  if (c != null && r != null) swing {
    c.addComponentListener(new ComponentAdapter {
      public void componentResized(ComponentEvent e) {
        pcallF(r);
      }
    });
  }
  ret c;
}

static <A extends Component> A onResize(Runnable r, A c) {
  ret onResize(c, r);
}

Author comment

Began life as a copy of #1007282

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007285
Snippet name: onResize
Eternal ID of this version: #1007285/5
Text MD5: aef8761e346ad91df95256e30de624ee
Transpilation MD5: 3a6c6b45798539dfa58d24abe8804f05
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-11 20:44:14
Source code size: 348 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 703 / 741
Version history: 4 change(s)
Referenced in: [show references]