user463504
user463504

Reputation: 1

function to set background image in a jframe in java netbeans ide

I am making a java application using netbeans ide 6.8. I don't the function to set a background image to my jframe. I will be very helpful if you can post the specific coding.

Upvotes: 0

Views: 13163

Answers (2)

Taylor
Taylor

Reputation: 11

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.

Upvotes: 0

camickr
camickr

Reputation: 324108

There is not function to do this. You need custom code. Background Panel has a couple of suggestions depending on your requirements.

Upvotes: 1

Related Questions