loading an image to frame

Reply

Join Date: Oct 2009
Posts: 2
Reputation: shiri is an unknown quantity at this point 
Solved Threads: 0
shiri shiri is offline Offline
Newbie Poster

loading an image to frame

 
0
  #1
Oct 3rd, 2009
hi ppl. I've done 8 frames on JAVA netbeans 6.7 with the default color but now i'm required to put a background picture(image), i have no idea how..
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,300
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 69
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: loading an image to frame

 
1
  #2
Oct 3rd, 2009
You can create an ImageIcon and display it as the content of a JLabel. Then put the JLabel in the content pane of your JFrame. Look here:

Tutorial
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 362 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC