1 | static JPanel jTiledBackground(S imageID) { |
2 | ret jTiledBackground(loadImage2(imageID)); |
3 | } |
4 | |
5 | static JPanel jTiledBackground(final BufferedImage tileImage) { |
6 | ret swing(func -> JPanel { ret new JPanel { |
7 | protected void paintComponent(Graphics g) { |
8 | paintTiledBackground(this, g, tileImage); |
9 | } |
10 | }; }); |
11 | } |
12 | |
13 | static JPanel jTiledBackground(S imageID, Component contents) { |
14 | ret jTiledBackground(loadImage2(imageID), contents); |
15 | } |
16 | |
17 | static JPanel jTiledBackground(BufferedImage tileImage, Component contents) { |
18 | JPanel panel = jTiledBackground(tileImage); |
19 | panel.setLayout(new BorderLayout); |
20 | panel.add(BorderLayout.CENTER, jtransparent_recursive(contents)); |
21 | ret panel; |
22 | } |
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: | #1006894 |
Snippet name: | jTiledBackground |
Eternal ID of this version: | #1006894/11 |
Text MD5: | a99c8ef315794d13143662655488583b |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-07 19:54:08 |
Source code size: | 708 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 638 / 629 |
Version history: | 10 change(s) |
Referenced in: | [show references] |