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

20
LINES

< > BotCompany Repo | #1003312 // jbutton - extended synonym of newButton

JavaX fragment (include)

static JButton jbutton(S text, Runnable action) {
  ret newButton(text, action);
}

static JButton jbutton(S text, O action) {
  ret newButton(text, action);
}

// button without action
static JButton jbutton(S text) {
  ret newButton(text, null);
}

/*static JButton jbutton(BufferedImage img, O action) {
  ret setButtonImage(img, jbutton("", action));
}*/

static JButton jbutton(Action action) {
  ret swingNu(JButton.class, action);
}

Author comment

Began life as a copy of #1003297

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: #1003312
Snippet name: jbutton - extended synonym of newButton
Eternal ID of this version: #1003312/8
Text MD5: 7ebe30646ad02b1f2e458135a9887a2f
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-29 03:59:41
Source code size: 458 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 584 / 678
Version history: 7 change(s)
Referenced in: [show references]