Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
vinoth sathiyamoorthy
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Taylor Rhoads
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic