I am creating a program that will simulate a fish tank (got it off of google) and when I try to get the image using

mClownImage = getToolkit().getImage("Fishes/mClown.gif");

the getToolkit() part gives me an error. it suggests that I make a method called that. I have imported java.awt.Container; which contains the getToolkit method.

How would I fix this problem?

Thanks

Toolkit.getDefaultToolkit().getImage(path)

Another choice for reading an image file is the ImageIO class. It has several methods to do that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.