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

17
LINES

< > BotCompany Repo | #1016672 - setImage

JavaX fragment (include)

static JLabel setImage(final BufferedImage img, final JLabel lbl) {
  if (lbl != null) swing { lbl.setIcon(imageIcon(img)); }
  ret lbl;
}

static JLabel setImage(JLabel lbl, BufferedImage img) {
  ret setImage(img, lbl);
}

static JLabel setImage(final S imageID, final JLabel lbl) {
  if (lbl != null) swing { lbl.setIcon(imageIcon(imageID)); }
  ret lbl;
}

static JLabel setImage(JLabel lbl, S imageID) {
  ret setImage(imageID, lbl);
}

Author comment

Began life as a copy of #1007468

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1016672
Snippet name: setImage
Eternal ID of this version: #1016672/4
Text MD5: 8c78caf0de2f0da54b92c024d77819bd
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-27 15:32:12
Source code size: 456 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 212
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1016672 & http://1016672.tinybrain.de