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

13
LINES

< > BotCompany Repo | #1018402 // addComponents - add Swing components to container & revalidate - returns container

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

Transpiled version (5197L) is out of date.

static <A extends Container> A addComponents(A c, Cl<? extends Component> components) {
  if (nempty(components)) swing {
    for (Component comp : components)
      if (comp != null)
        c.add(comp);
    revalidate(c);
  }
  ret c;
}

static <A extends Container> A addComponents(A c, Component... components) {
  ret addComponents(c, asList(components));
}

Author comment

Began life as a copy of #1016349

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018402
Snippet name: addComponents - add Swing components to container & revalidate - returns container
Eternal ID of this version: #1018402/7
Text MD5: 53e76d3846defe2ebaa7f8e36ef2ffd9
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-16 16:10:52
Source code size: 374 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 246 / 348
Version history: 6 change(s)
Referenced in: [show references]