Libraryless. Click here for Pure Java version (7033L/39K).
static int vstackWithSpacing_fixed_default = 10; static JPanel vstackWithSpacing_fixed(L parts, int spacing default vstackWithSpacing_fixed_default) { ret swing(-> { JPanel panel = new JPanel(new GridBagLayout); new GridBagConstraints gbc; gbc.weightx = 1; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.insets = new Insets(0, 0, spacing, 0); smartAddWithLayout(panel, gbc, flattenToArray(parts)); gbc.weighty = 1; gbc.insets = new Insets(0, 0, 0, 0); panel.add(jrigid(), gbc); ret panel; }); } static JPanel vstackWithSpacing_fixed(int spacing default vstackWithSpacing_fixed_default, Component... parts) { ret vstackWithSpacing_fixed(asList(parts), spacing); }
Began life as a copy of #1006626
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034304 | 
| Snippet name: | vstackWithSpacing_fixed - stack components vertically. fixed top margin | 
| Eternal ID of this version: | #1034304/3 | 
| Text MD5: | 67b64bfe8fd2f6245b94590a3c3cd7b8 | 
| Transpilation MD5: | e2625ea6c0872807e3eec55bbde691b2 | 
| Author: | stefan | 
| Category: | javax / gui | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2022-02-01 17:50:58 | 
| Source code size: | 779 bytes / 21 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 365 / 483 | 
| Version history: | 2 change(s) | 
| Referenced in: | [show references] |