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

15
LINES

< > BotCompany Repo | #1016811 // hgridWithSpacing

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

Libraryless. Click here for Pure Java version (4053L/24K).

static JPanel hgridWithSpacing(O... _parts) {
  ret swing(() -> {
    int spacing = 6;
    O[] parts = _parts;
    if (first(parts) instanceof Int) {
      spacing = (Int) first(parts);
      parts = dropFirst(parts);
    }
    JPanel panel = hgrid(parts);
    GridLayout gl = cast panel.getLayout();
    gl.setHgap(spacing);
    gl.setVgap(spacing);
    ret panel;
  });
}

Author comment

Began life as a copy of #1001783

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016811
Snippet name: hgridWithSpacing
Eternal ID of this version: #1016811/5
Text MD5: 928afde227b9350563fa601610bfe276
Transpilation MD5: 762b97701b074bf2f6140800108eb96b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-07 19:17:53
Source code size: 387 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 432
Version history: 4 change(s)
Referenced in: [show references]