aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "back ground image repeating" Watch "back ground image repeating" New topic
Author

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?

sincerly,
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

http://faq.javaranch.com/view?BackgroundImageOnJPanel
Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
beautiful. thanks for helping
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: back ground image repeating