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

20
LINES

< > BotCompany Repo | #1015433 // jImageLabel

JavaX fragment (include)

static JLabel jImageLabel(Image img) {
  ret swingNu(JLabel.class, imageIcon(img));
}

static JLabel jImageLabel(javax.swing.Icon icon) {
  ret swingNu(JLabel.class, icon);
}

static JLabel jImageLabel(S imageID) {
  ret jImageLabel(imageIcon(imageID));
}

static JLabel jImageLabel(S text, S imageID) {
  final JLabel l = swingNu(JLabel.class, text, imageIcon(imageID), JLabel.CENTER);
  swing  {
    l.setVerticalTextPosition(SwingConstants.BOTTOM);
    l.setHorizontalTextPosition(SwingConstants.CENTER);
  }
  ret l;
}

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: #1015433
Snippet name: jImageLabel
Eternal ID of this version: #1015433/9
Text MD5: 1eb0f9d9be37b51fe4cfde49b2de3a0c
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-06-22 01:21:35
Source code size: 541 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 461 / 512
Version history: 8 change(s)
Referenced in: [show references]