Setting a Background Image in Netbeans IDE
Simplified instructions:
Create a JFrame,
On design view, right click the JFrame, click Layout => Null
Create a JLabel, resize it so it covers your JFrame.
Right Click the JLabel, Find Icon and click on the (...) button.
Pick a picture by clicking the Import to project button, then click finish.
In the Navigator pane, (Bottom left by default, if disabled go to the Windows tab of your Netbeans IDE and enable it.) right click on your JFrame and select Change Order. Then just put every object on top of your JLabel that contains your background image. You're done!
Specific Instructions:
Step 1: You must create the application form. Do this by clicking, File -> New Project -> Finish.
Step 2: In the Projects field, (the top left, by default) expand the Project's tree by clicking on the + sign next to it. Then right click on the Source packages node and click New => JFrame Form => Finish.
Step 3: Right click the JFrame and select Set Layout => Null.
Step 4: In the JFrame, create a JLabel using the Palette, (the Palette is top right by default) by clicking and dragging Label to the JFrame area.
Step 5: Resize your JLabel so that it covers the entirety of your JFrame, because you will need your background image to occupy that space.
Step 6: Right click the JLabel, click properties, navigate to the icon property, and select the (...) button to the right of it. Then in the popup window that appears, click Import to Project and select the picture you'd like to add.
DETAILED VIDEO BELOW

Thank You so much. I've searched alot with no vain but This is the simplest way I've found.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteIt is working for me with OpenJDK Java 7 and NetBeans IDE 7 in linux Ubuntu 12.04, but with little bit different method, in step3 i setup Set Layout > Absolut Design. working like a charm.........thank you very much for the clue...
ReplyDeletethanks a lot
ReplyDeletenot working for me
DeleteAt last we shud right click on the swing controls like buttons,textfields and select move down.
ReplyDelete1 problem down thanks to this tutorial
ReplyDeleteBut, How to add a background image that auto-resizes when screen resolution is changed?
ReplyDeletehahhahahahhaa ane mattttto
ReplyDeleteHaha menna lankawe buwek :3
DeleteHe he java pisu wage bn vb nam owa gemak nane
Deletethanks..
ReplyDeletethaksss...............
ReplyDeleteThanks!!!!
ReplyDeletethank u
ReplyDeletethis code very useful to me thank u very much
ReplyDeleteThank you very much dude.... this is awesome....
ReplyDeleteThanks! But now when i run the window has to be resized to show the image. How do I fix that?
ReplyDeleteReally Great Boss.............at last i can do it. Thanks Boss
ReplyDelete@ Safiqul, Dhaka, Bangladesh.
DeleteThis code butt
ReplyDeletefight me irl +44 7525 482788
ReplyDeletethanks
ReplyDeletegreat blog.. really appreciate it :)
ReplyDeleteWorth Reading..thanx :)
ReplyDeleteThanks a lot buddy
ReplyDeleteThank You :) :)
ReplyDeleteThanks a lot
ReplyDeletehow to make the image fits to screen.. i found this easy but image not getting enlarged to screen size
ReplyDeleteimage cannot be enlatrged... you have to resize it before adding it to jlabel using paint or photoshop..
DeleteAwesome thanks.
ReplyDeleteWhenever i add any other component on jlabel background it get invisible...help
ReplyDeleteOK. for there super and all thing ok,but I need to the image changing when I do something.Like when the user choosed 2nd item from JComboBox or another thing wallpaper will be changed.
ReplyDeleteDoes anyone have an idea?
Soooo Sorry for my bad English :)
For change the same image on JLabel (used for background) just change image url or path with new image path or url.
ReplyDelete:)
but the picture losts a rest of it. how can i do?
ReplyDeletehow to set image for windows desktop
ReplyDeletevery poor
ReplyDeletevery helpful,thanks a lot
ReplyDelete