All components have a paint(AWT) or paintComponent(Swing) method that you can override to draw an image as background for that component. If you search for paintComponent( you'll probably find some examples.
Originally posted by Mike Lipay: I am writing a desktop application and want to include a background image, but I can't find a container type that will hold an image. How can I do this?
You can use a JLayered pane. Add your component to a layer far behind your normal components. You'll have to call setOpaque(false) on all the components that draw on top of the background image in order to see the background.
JFrame has a root pane which is already a JLayered pane, so you can just add your component to that.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop