i want to implement a graphic image which would be contained inside a frame or panel, may be like a canvas. how to use an image as a canvas like a background upon which i want to place other components ? also what should be the format of the image ? jpg is ok ?
If you just want to use a background image, and if you are using Swing, you can just put the image on the JPanel using a JLabel. myLabel = new JLabel(new ImageIcon("some.gif")); myPanel.add(myLabel, new Integer(Integer.MIN_VALUE)); See if that works for you.