static JPanel jTiledBackground(S imageID) { ret jTiledBackground(loadImage2(imageID)); } static JPanel jTiledBackground(final BufferedImage tileImage) { ret swing(func -> JPanel { ret new JPanel { protected void paintComponent(Graphics g) { paintTiledBackground(this, g, tileImage); } }; }); } static JPanel jTiledBackground(S imageID, Component contents) { ret jTiledBackground(loadImage2(imageID), contents); } static JPanel jTiledBackground(BufferedImage tileImage, Component contents) { JPanel panel = jTiledBackground(tileImage); panel.setLayout(new BorderLayout); panel.add(BorderLayout.CENTER, jtransparent_recursive(contents)); ret panel; }
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: | 851 / 862 |
| Version history: | 10 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1007290 - renderTiledBackground #1009941 - paintTiledBackground #1009942 - jTiledBackgroundDesktopPane #1014107 - jTiledBackground_trackWidth #1014538 - jCenteredBackgroundImage |