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)

static JCheckBox jCenteredCheckBox() {
  ret centerCheckBox(new JCheckBox());
}

static JCheckBox jCenteredCheckBox(bool checked) {
  ret centerCheckBox(new JCheckBox("", checked));
}

static JCheckBox jCenteredCheckBox(S text, bool checked) {
  ret centerCheckBox(new JCheckBox(text, checked));
}

static JCheckBox jCenteredCheckBox(S text) {
  ret centerCheckBox(new JCheckBox(text));
}
  
static JCheckBox jCenteredCheckBox(S text, bool checked, fO onChange) {
  ret centerCheckBox(jCheckBox(text, checked, onChange));
}
  
// onChange can be a Runnable or a voidfunc(bool)
static JCheckBox jCenteredCheckBox(bool checked, fO onChange) {
  ret centerCheckBox(jCheckBox(checked, onChange);
}

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: 530 / 555
Version history: 1 change(s)
Referenced in: [show references]