Libraryless. Click here for Pure Java version (4053L/24K).
1 | static JPanel hgridWithSpacing(O... _parts) { |
2 | ret swing(() -> { |
3 | int spacing = 6; |
4 | O[] parts = _parts; |
5 | if (first(parts) instanceof Int) { |
6 | spacing = (Int) first(parts); |
7 | parts = dropFirst(parts); |
8 | } |
9 | JPanel panel = hgrid(parts); |
10 | GridLayout gl = cast panel.getLayout(); |
11 | gl.setHgap(spacing); |
12 | gl.setVgap(spacing); |
13 | ret panel; |
14 | }); |
15 | } |
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: | 473 / 595 |
Version history: | 4 change(s) |
Referenced in: | [show references] |