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

14
LINES

< > BotCompany Repo | #1019425 // onFirstResize

JavaX fragment (include)

svoid onFirstResize(Component c, O r) {
  onFirstResize(c, toRunnable(r));
}

svoid onFirstResize(Component c, Runnable r) {
  if (c != null && r != null) swing {
    c.addComponentListener(new ComponentAdapter {
      public void componentResized(ComponentEvent e) {
        c.removeComponentListener(this);
        pcallF(r);
      }
    });
  }
}

Author comment

Began life as a copy of #1007285

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019425
Snippet name: onFirstResize
Eternal ID of this version: #1019425/5
Text MD5: 9dd1e31a48b6e0d0cb5f24759b2ec9b2
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-22 21:01:42
Source code size: 362 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 450
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1033557 - revalidateOnFirstResize