Libraryless. Click here for Pure Java version (9216L/51K).
1 | static int withLeftMargin_defaultWidth = 6; |
2 | |
3 | static JPanel withLeftMargin(Component etc c) { |
4 | ret withLeftMargin(withLeftMargin_defaultWidth, c); |
5 | } |
6 | |
7 | static JPanel withLeftMargin(int margin, Component etc c) { |
8 | ret swing(func -> JPanel { |
9 | JPanel p = new JPanel(new BorderLayout); |
10 | p.setBorder(BorderFactory.createEmptyBorder(0, margin, 0, 0)); |
11 | p.add(c); |
12 | ret p; |
13 | }); |
14 | } |
Began life as a copy of #1006306
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007247 |
Snippet name: | withLeftMargin |
Eternal ID of this version: | #1007247/7 |
Text MD5: | d92ef0847936a169e14be2086d7e6553 |
Transpilation MD5: | d42e388d5d520417255aa39c5c5178c8 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-16 15:17:35 |
Source code size: | 396 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 779 / 865 |
Version history: | 6 change(s) |
Referenced in: | [show references] |