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).

1  
static JPanel vgridWithSpacing(O... _parts) {
2  
  ret swing(() -> {
3  
    L parts = flattenToList(_parts);
4  
    int spacing = 6;
5  
    if (first(parts) instanceof Int) {
6  
      spacing = (Int) first(parts);
7  
      parts = dropFirst(parts);
8  
    }
9  
    JPanel panel = vgrid(parts);
10  
    GridLayout gl = cast panel.getLayout();
11  
    gl.setHgap(spacing);
12  
    gl.setVgap(spacing);
13  
    ret panel;
14  
  });
15  
}

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: 100 / 167
Version history: 2 change(s)
Referenced in: [show references]