Download Jar. Libraryless. Click here for Pure Java version (5212L/37K).
!7 sclass JListWithBackground extends JList { BufferedImage image; Color backgroundColor; *(BufferedImage *image, Color *backgroundColor) { jtransparent_hard(this); setColorizationFactor(this); } protected void paintComponent(Graphics g) { paintCenteredBackgroundImage(this, g, image, backgroundColor); super.paintComponent(g); } } p/*-subst*/ { BufferedImage img = bufferedImageContrastAndBrightness(loadImage2(#1101314), 1, 150); Color bgColor = new Color(img.getRGB(0, 0)); JList list = jtransparent_hard(jlist()); fillListWithStrings(list, repF(100, f aGlobalID)); final JScrollPane scrollPane = jscroll(list); swing { scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); } //setForeground(Color.red, list); //showFrame(scrollPane); showFrame(setBackground(bgColor, jCenteredBackgroundImage(img, scrollPane))); }
Began life as a copy of #1016232
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016234 |
Snippet name: | List With Background Test attempt 2 (WORKS without Substance) |
Eternal ID of this version: | #1016234/6 |
Text MD5: | a49e3f4810888ce51434ab3c8258c857 |
Transpilation MD5: | 056e5adda50f31506dca0b8ba92d831d |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-11 15:01:57 |
Source code size: | 948 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 470 / 1166 |
Version history: | 5 change(s) |
Referenced in: | [show references] |