Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

29
LINES

< > BotCompany Repo | #1016232 // List With Background Test (OK only without Substance, background scrolls with list)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (5151L/36K).

1  
!7
2  
3  
sclass JListWithBackground extends JList {
4  
  BufferedImage image;
5  
  Color backgroundColor;
6  
  
7  
  *(BufferedImage *image, Color *backgroundColor) {
8  
    jtransparent_hard(this);
9  
    setColorizationFactor(this);
10  
  }
11  
  
12  
  protected void paintComponent(Graphics g) {
13  
    paintCenteredBackgroundImage(this, g, image, backgroundColor);
14  
    super.paintComponent(g);
15  
  }
16  
}
17  
18  
p {
19  
  BufferedImage img = bufferedImageContrastAndBrightness(loadImage2(#1101314), 1, 150);
20  
  Color bgColor = new Color(img.getRGB(0, 0));
21  
  JList list = swingNu(JListWithBackground, img, bgColor);
22  
  fillListWithStrings(list, repF(100, f aGlobalID));
23  
  //setForeground(Color.red, list);
24  
  showFrame(list);
25  
  
26  
  /*showFrame(setBackground(awtColor("#35312F"),
27  
    jCenteredBackgroundImage(#1101314,
28  
      wrap(list))));*/
29  
}

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: #1016232
Snippet name: List With Background Test (OK only without Substance, background scrolls with list)
Eternal ID of this version: #1016232/15
Text MD5: 62096fa76a0e7176d1e3152f8353f7c7
Transpilation MD5: d7e963d21bf871612634677274ba44c5
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 13:34:54
Source code size: 817 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 441 / 1126
Version history: 14 change(s)
Referenced in: [show references]