Background « JScrollPane « Java Swing Q&A





1. JScrollPanel with custom background    stackoverflow.com

I'm trying to create a scrollable menu with item in them I want to be able to draw a custom background to the scroll and have it be fixed when I ...

2. JScrollPane background color    coderanch.com

3. Background image in jscrollpane    coderanch.com

Hi, Can u plz help me in keeping the background image in jscrollpane.. I have written the following method in myscrollpane: image is some Imageicon. public void paint(Graphics g){ if(image!=null){ Rectangle rec=getViewportBorderBounds(); for( int x = 0; x < rec.width; x += image.getIconWidth() ) for( int y = 0; y < rec.height; y += image.getIconHeight() ) g.drawImage( image.getImage(), x, y, null, ...

4. Set Background image to JScrollPane --- Need Help!!    forums.oracle.com

Not sure what your objective is. If you just want to be able to put an image up and be able to scroll it, then you simply set the Icon of your Label to the desired image - all is well. The following some sample code that will do that: BufferedImage image = ImageIO.read(new File("/home/dlpinto/Desktop/Screenshot.png")); JLabel label = new JLabel(new ImageIcon(image)); ...

5. Set Background image to JScrollPane    forums.oracle.com