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).

!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 {
  BufferedImage img = bufferedImageContrastAndBrightness(loadImage2(#1101314), 1, 150);
  Color bgColor = new Color(img.getRGB(0, 0));
  JList list = swingNu(JListWithBackground, img, bgColor);
  fillListWithStrings(list, repF(100, f aGlobalID));
  //setForeground(Color.red, list);
  showFrame(list);
  
  /*showFrame(setBackground(awtColor("#35312F"),
    jCenteredBackgroundImage(#1101314,
      wrap(list))));*/
}

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: 442 / 1126
Version history: 14 change(s)
Referenced in: #1016234 - List With Background Test attempt 2 (WORKS without Substance)