1 | static JPanel jCenteredBackgroundImage(S imageID) { |
2 | ret jCenteredBackgroundImage(loadImage2(imageID)); |
3 | } |
4 | |
5 | static JPanel jCenteredBackgroundImage(final BufferedImage image) { |
6 | ret swing(func -> JPanel { ret new JPanel { |
7 | protected void paintComponent(Graphics g) { |
8 | paintCenteredBackgroundImage(this, g, image); |
9 | } |
10 | }; }); |
11 | } |
12 | |
13 | static JPanel jCenteredBackgroundImage(S imageID, Component contents) { |
14 | ret jCenteredBackgroundImage(loadImage2(imageID), contents); |
15 | } |
16 | |
17 | static JPanel jCenteredBackgroundImage(final BufferedImage image, final Component contents) { |
18 | ret swing(func -> JPanel { |
19 | JPanel panel = jCenteredBackgroundImage(image); |
20 | panel.setLayout(new BorderLayout); |
21 | panel.add(BorderLayout.CENTER, jtransparent_recursive(contents)); |
22 | ret panel; |
23 | }); |
24 | } |
Began life as a copy of #1006894
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: | #1014538 |
Snippet name: | jCenteredBackgroundImage |
Eternal ID of this version: | #1014538/2 |
Text MD5: | f17fd39c69ed9eb6ae3623da51f0db09 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-23 19:29:21 |
Source code size: | 813 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 471 / 523 |
Version history: | 1 change(s) |
Referenced in: | [show references] |