Libraryless. Click here for Pure Java version (7381L/43K).
static JButton setButtonImage(Icon img, JButton btn) { btn.setIcon(img); ret btn; } static JButton setButtonImage(Image img, JButton btn) { btn.setIcon(imageIcon(img)); ret btn; } static <A extends AbstractButton> A setButtonImage(Image img, A btn) { btn.setIcon(imageIcon(img)); ret btn; } static <A extends AbstractButton> A setButtonImage(A btn, Image img) { ret setButtonImage(img, btn); } static <A extends AbstractButton> A setButtonImage(A btn, S imageID) { btn.setIcon(imageIcon(imageID)); ret btn; } static JButton setButtonImage(JButton btn, Image img) { ret setButtonImage(img, btn); } static JButton setButtonImage(JButton btn, Icon img) { ret setButtonImage(img, btn); }
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: | #1007468 |
Snippet name: | setButtonImage |
Eternal ID of this version: | #1007468/13 |
Text MD5: | e0d6cd72453784bcb9b387e815b092ab |
Transpilation MD5: | c23951f2bd03183b756bdc15330e817a |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-15 22:31:54 |
Source code size: | 741 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 625 / 734 |
Version history: | 12 change(s) |
Referenced in: | [show references] |