Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1010168 // setHorizontalMargin - set margins of JButton etc.

JavaX fragment (include)

1  
static <A extends AbstractButton> A setHorizontalMargin(final int margin, final A a) {
2  
  swing {
3  
    Insets i = a.getMargin(); 
4  
    a.setMargin(new Insets(i.top, margin, i.bottom, margin));
5  
  }
6  
  ret a;
7  
}
8  
9  
static <A extends AbstractButton> A setHorizontalMargin(A a, int margin) {
10  
  ret setHorizontalMargin(margin, a);
11  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010168
Snippet name: setHorizontalMargin - set margins of JButton etc.
Eternal ID of this version: #1010168/4
Text MD5: 4f14b017ddc464476c7b398af6b1a535
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-25 23:32:35
Source code size: 326 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 507 / 569
Version history: 3 change(s)
Referenced in: [show references]