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

15
LINES

< > BotCompany Repo | #1031128 // vgridWithSpacing

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

Libraryless. Click here for Pure Java version (10791L/61K).

static JPanel vgridWithSpacing(O... _parts) {
  ret swing(() -> {
    L parts = flattenToList(_parts);
    int spacing = 6;
    if (first(parts) instanceof Int) {
      spacing = (Int) first(parts);
      parts = dropFirst(parts);
    }
    JPanel panel = vgrid(parts);
    GridLayout gl = cast panel.getLayout();
    gl.setHgap(spacing);
    gl.setVgap(spacing);
    ret panel;
  });
}

Author comment

Began life as a copy of #1016811

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031128
Snippet name: vgridWithSpacing
Eternal ID of this version: #1031128/3
Text MD5: 6d857271faba32bcb8e73c04102cc3f4
Transpilation MD5: 0f0ec0c90085bc87cd16e94a9740f1b6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-27 02:28:50
Source code size: 400 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 162 / 248
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)