Background Image

Hi Sun Team and Swing Fans !

Well I have the following code:

public class dataTable extends JApplet {

..bla bla .bla boring stuff!!!

public void init () {

Container contentPane = getContentPane();

contentPane.setLayout(new FlowLayout());

contentPane.setLayout(null);

contentPane.setBackground(new java.awt.Color (0, 153, 153));

..bla bla more boring stuff!!!

}

Is it possible, instead of setting a background color, to set a background image, like the background of my layout panel would be an image instead of a color. If yes how would I implement it? (I really would appreciate some code examples please.)

Somebody replied to my earlier posting but unfortunately after the image is loaded it looks like I cannot add any other component on top of that image. I should be able to add a textbox ..or textfield..and so on.. with the image in the background.

Thank you very much in advance, Albert.

[989 byte] By [AAlbertF] at [2007-9-26 2:59:02]
# 1
You can use a class called JLayeredPane for doing all the cool stuff on images. Your applets would look great on an image background and there is no problem in adding components on the top.I can mail u examples, if u want them.....reply.MM.
megamatrix at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...
# 2
MMI would be interested cause I have a similar problem.Hanns
HannsWeil at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...
# 3
MM can i have the example too.. im facing the same problem..thanks in example
pinky_pink at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...
# 4
oops i mean advance
pinky_pink at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...
# 5
Pls if you still have it, mail it me!!! eleonorab@list.ru1000 * 10nx!
ellabider at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...
# 6
Here's an [url http://forum.java.sun.com/thread.jsp?thread=457404&forum=57&message=2089603]example[/url] you might be able to adapt to your needs.
74philip at 2007-6-29 10:54:38 > top of Java-index,Archived Forums,Swing...