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.
posted 14 years ago
Hi Mark, Here is a class that you can use. It comes with an example class to see how it is used.