File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes back ground image repeating Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "back ground image repeating" Watch "back ground image repeating" New topic

back ground image repeating

Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
hey i have a problem. i set the background image to "something.png" its a repeating pattern which is just for the background. Here is the problem. When i resize my frame, the image only spreads so far, and then theres white space. so is there a quick and easy way to get the image to repeat?

Chris Dancy

("Anger is not an emotion, its a symptom of fear.")
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
use the drawImage() with width/height parameters

the swing FAQ has an example
Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
beautiful. thanks for helping
I agree. Here's the link:
subject: back ground image repeating
Similar Threads
background image removal while printing pdf in jasper reports
Transparent Image Overlays using CSS
How to get background image in XSL FO
Adding Label on another Label
Embossing a sprite on an image background