*
The moose likes IDEs, Version Control and other tools and the fly likes how to import background image into netbeans's Desktop application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "how to import background image into netbeans Watch "how to import background image into netbeans New topic
Author

how to import background image into netbeans's Desktop application?

vinoth sathiyamoorthy
Ranch Hand

Joined: Sep 30, 2008
Posts: 31
Hi friends,

Iam using netbeans 6.5. i created swing desktop application.in that form i cannot import or set background image.
in JButton it have option to set icon image.

but in form doesnot have.

if possible to setBackground image using form properties?

anybody know how to set bsckground image.

thanks in advance.


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Do yourself a huge favor and stop using IDEs which automatically generate code for you. That way you will never learn.

You need to paint the image as a background on a panel and then set the panel as the content pane.
http://faq.javaranch.com/java/BackgroundImageOnJPanel

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Taylor Rhoads
Greenhorn

Joined: Feb 02, 2012
Posts: 1
There isn't a function to do that, you have to set a JLabel with your icon property set to the picture and set it to the length and width of the JFrame and set the JFrame's layout property value to null. Then just change the order of the buttons/Labels and what have you so that the background is in fact, in the back.
For a more detailed solution to the particular problem,go to

http://www.netbeanstutorials.com/p/setting-background-image.html

There's even a video how to do it there. I know I was specific but to a newbie it can be overwhelming.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to import background image into netbeans's Desktop application?
 
Similar Threads
awt
Background Image
To Display background image in a Jframe/JPanel
dimension not perfect
Servlet and Image