Hi Try this piece of code. I dould'nt get it if you wanted the combobox to have a background image or if the combobox needed to be placed on a container that has a Background image. The code is for the latter one.
import java.awt.*;
import javax.swing.*;
import symantec.itools.multimedia.ImageViewer;
import symantec.itools.awt.ImagePanel;
/**
* A basic extension of the javax.swing.JApplet class
*/
public class JApplet1 extends JApplet
{
public void init()
{
// Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
symantec.itools.lang.Context.setApplet(this);
// This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your
Java file into its visual environment.
//{{INIT_CONTROLS
getContentPane().setLayout(null);
setSize(421,266);
getContentPane().add(box);
box.setBounds(108,156,228,24);
try {
image.setImageURL(new java.net.URL("file:///D:/Images/nature19.jpg"));
}
catch (java.net.MalformedURLException error) { }
catch(java.beans.PropertyVetoException e) { }
try {
image.setStyle(symantec.itools.awt.ImagePanel.IMAGE_SCALED_TO_FIT);
}
catch(java.beans.PropertyVetoException e) { }
image.setLayout(new BorderLayout(0,0));
getContentPane().add(image);
image.setBounds(60,48,291,90);
//}}
image.add(box, BorderLayout.NORTH);
}
//{{DECLARE_CONTROLS
javax.swing.JComboBox box = new javax.swing.JComboBox();
symantec.itools.awt.ImagePanel image = new symantec.itools.awt.ImagePanel();
//}}
}
Meghna