Libraryless. Click here for Pure Java version (4719L/26K).
1 | static <A extends Component> A onResize(A c, Runnable r) { |
2 | if (c != null && r != null) swing { |
3 | c.addComponentListener(new ComponentAdapter { |
4 | public void componentResized(ComponentEvent e) { |
5 | pcallF(r); |
6 | } |
7 | }); |
8 | } |
9 | ret c; |
10 | } |
11 | |
12 | static <A extends Component> A onResize(Runnable r, A c) { |
13 | ret onResize(c, r); |
14 | } |
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: | 705 / 743 |
Version history: | 4 change(s) |
Referenced in: | [show references] |