This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
It is sorta covered in the JavaRanch Style Guide.
subject: back ground image repeating
Similar Threads
Transparent Image Overlays using CSS
Adding Label on another Label
How to get background image in XSL FO
Embossing a sprite on an image background
background image removal while printing pdf in jasper reports