1 | static JLabel jImageLabel(Image img) { |
2 | ret swingNu(JLabel.class, imageIcon(img)); |
3 | } |
4 | |
5 | static JLabel jImageLabel(javax.swing.Icon icon) { |
6 | ret swingNu(JLabel.class, icon); |
7 | } |
8 | |
9 | static JLabel jImageLabel(S imageID) { |
10 | ret jImageLabel(imageIcon(imageID)); |
11 | } |
12 | |
13 | static JLabel jImageLabel(S text, S imageID) { |
14 | final JLabel l = swingNu(JLabel.class, text, imageIcon(imageID), JLabel.CENTER); |
15 | swing { |
16 | l.setVerticalTextPosition(SwingConstants.BOTTOM); |
17 | l.setHorizontalTextPosition(SwingConstants.CENTER); |
18 | } |
19 | ret l; |
20 | } |
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: | 543 / 604 |
Version history: | 8 change(s) |
Referenced in: | [show references] |