static int withTopMargin_defaultWidth = 6; static JPanel withTopMargin(Component c) { ret withTopMargin(withTopMargin_defaultWidth, c); } static JPanel withTopMargin(final int w, final Component c) { ret swing(func -> JPanel { JPanel p = new JPanel(new BorderLayout); p.setBorder(BorderFactory.createEmptyBorder(w, 0, 0, 0)); p.add(c); ret p; }); }
Began life as a copy of #1004959
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: | #1006529 |
Snippet name: | withTopMargin |
Eternal ID of this version: | #1006529/5 |
Text MD5: | e1e88141b3dd50efdfe50795c2846540 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-04 18:58:25 |
Source code size: | 385 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 589 / 639 |
Version history: | 4 change(s) |
Referenced in: | [show references] |