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

24
LINES

< > BotCompany Repo | #1007121 // jCenteredCheckBox - make horizontally centered JCheckBox

JavaX fragment (include)

1  
static JCheckBox jCenteredCheckBox() {
2  
  ret centerCheckBox(new JCheckBox());
3  
}
4  
5  
static JCheckBox jCenteredCheckBox(bool checked) {
6  
  ret centerCheckBox(new JCheckBox("", checked));
7  
}
8  
9  
static JCheckBox jCenteredCheckBox(S text, bool checked) {
10  
  ret centerCheckBox(new JCheckBox(text, checked));
11  
}
12  
13  
static JCheckBox jCenteredCheckBox(S text) {
14  
  ret centerCheckBox(new JCheckBox(text));
15  
}
16  
  
17  
static JCheckBox jCenteredCheckBox(S text, bool checked, fO onChange) {
18  
  ret centerCheckBox(jCheckBox(text, checked, onChange));
19  
}
20  
  
21  
// onChange can be a Runnable or a voidfunc(bool)
22  
static JCheckBox jCenteredCheckBox(bool checked, fO onChange) {
23  
  ret centerCheckBox(jCheckBox(checked, onChange);
24  
}

Author comment

Began life as a copy of #1005426

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: #1007121
Snippet name: jCenteredCheckBox - make horizontally centered JCheckBox
Eternal ID of this version: #1007121/2
Text MD5: 635c553a3f1a5cb7139773b4431288db
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-05 01:19:12
Source code size: 716 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 532 / 558
Version history: 1 change(s)
Referenced in: [show references]