Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Madmonky1

[java] Show an image?

This topic is 5682 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

my code is:
import java.awt.*;
import java.awt.event.*;

import java.util.*;

public class SpellAnimations
{
	public int p1x = 0;
	public int p2x = 0;
	public int p3x = 0;
	public int p4x = 0;
	public int p5x = 0;
	public int p6x = 0;
	public int p7x = 0;
	public int p8x = 0;
	public int p9x = 0;
	public int p10x = 0;
	public int p11x = 0;
	public int p12x = 0;
	public int p13x = 0;
	public int p14x = 0;
	public int p15x = 0;
	public int p16x = 0;
	public int p17x = 0;
	public int p18x = 0;
	public int p19x = 0;
	public int p20x = 0;
	public int p1y = 0;
	public int p2y = 0;
	public int p3y = 0;
	public int p4y = 0;
	public int p5y = 0;
	public int p6y = 0;
	public int p7y = 0;
	public int p8y = 0;
	public int p9y = 0;
	public int p10y = 0;
	public int p11y = 0;
	public int p12y = 0;
	public int p13y = 0;
	public int p14y = 0;
	public int p15y = 0;
	public int p16y = 0;
	public int p17y = 0;
	public int p18y = 0;
	public int p19y = 0;
	public int p20y = 0;
	public int ticks = 0;
	public int framerate = 5;
	public Image img2;
	public Image img3;
	public Image img4;
	public Image img5;
	public Image img6;
	public Image img7;
	public Image img8;
	public Image img9;
	public Image img1;
	public void GetImages(){
		
	img1 = getImage("/spellpic1.gif");
	}

	public void drawspell(Graphics g)
	{
		g.drawImage (img1, p1x, p1y, null);
	}

 
 
}
 
and my errors are:
--------------------Configuration: rpg - j2sdk1.4.1 --------------------
C:\Program Files\Xinox Software\JCreator LE\MyProjects\rpging\test\SpellAnimations.java:61: cannot resolve symbol
symbol  : method getImage (java.lang.String)
location: class SpellAnimations
	img1 = getImage("/spellpic1.gif");
               ^
1 error

Process completed.
 
Please help me, and thnx in advance.

Share this post


Link to post
Share on other sites
Advertisement
Toolkit.getDefaultToolkit().getImage(String filename)

EDIT: Forgot parentheses

-pirate_dau

[edited by - pirate_dau on October 31, 2002 11:15:42 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I already have made several java games, this is my first app though,

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!