aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Background images for the Frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Background images for the Frame" Watch "Background images for the Frame" New topic
Author

Background images for the Frame

Makong
Greenhorn

Joined: Oct 18, 2001
Posts: 2
Hi, can somebody tell me how can i insert a background image in my application? tanks!
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You'll have to make a specialized component ( like JImagePanel below... ) that can paint a graphic in the background. Then, you'll add that component to your frame, and add any new components to it.

-Nate



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
add your image to a JLabel, make the label the size u
wish, add the label last in your list of items being
added to your frame and make sure to make setOpaque(false)
in regards to your other components
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Almost forgot....

Makong,
Please re-register with a name that follows the guidelines of the JavaRanch naming conventions. We require all registered user names to be in the form "first name" + space + "last name". Thanks!
-Nate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Background images for the Frame