Tuesday, April 1, 2003 03:27 PM
You shouldn't need to create your own Graphics object. Just overwrite the paint method of a component such as a Panel and add that to you application.
Panel p = new Panel()
public void paint(Graphics g)
Toolkit kit = Toolkit.getDefaultToolkit();
Image image = kit.getImage("image.gif");
frame.add(p); // or add it to wherever you want it to go
However a simpler solution is to use an ImageIcon:
I hope this fixes you problem.