
import java.applet.Applet; import java.awt.*; public class ShowAnimator extends Applet { Image[] m_
有两处出现找不到符号的错误,高手指点一下是怎么回事?谢谢了importjava.applet.Applet;importjava.awt.*;publicclassSho...
有两处出现找不到符号的错误,高手指点一下是怎么回事?谢谢了
import java.applet.Applet;
import java.awt.*;
public class ShowAnimator extends Applet
{
Image[] m_Images;
int totalImages=18;
int currentImage=0;
public void init()
{
m_Images= new Image[totalImages];
for(int i=0;i<totalImages;i++)
m_Images[i]=getImages(getDocumentBase(),"images\\Img"+i+".gif");
}
public void start()
{
currentImage=0;
}
public void paint(Graphics g)
{
g.drawImage(m_Images[currentImage],50,50,this);
currentImage=++currentImage%totalImages;
try{
Thread.sheep(50);
}
catch(InterruptedException e)
{
&nb 展开
import java.applet.Applet;
import java.awt.*;
public class ShowAnimator extends Applet
{
Image[] m_Images;
int totalImages=18;
int currentImage=0;
public void init()
{
m_Images= new Image[totalImages];
for(int i=0;i<totalImages;i++)
m_Images[i]=getImages(getDocumentBase(),"images\\Img"+i+".gif");
}
public void start()
{
currentImage=0;
}
public void paint(Graphics g)
{
g.drawImage(m_Images[currentImage],50,50,this);
currentImage=++currentImage%totalImages;
try{
Thread.sheep(50);
}
catch(InterruptedException e)
{
&nb 展开
1个回答
展开全部
import java.applet.Applet;
import java.awt.*;
public class ShowAnimator extends Applet {
Image[] m_Images;
int totalImages = 18;
int currentImage = 0;
public void init() {
m_Images = new Image[totalImages];
for (int i = 0; i < totalImages; i++)
m_Images[i] = getImage(getDocumentBase(), "images\\Img" + i//单词打错
+ ".gif");
}
public void start() {
currentImage = 0;
}
public void paint(Graphics g) {
g.drawImage(m_Images[currentImage], 50, 50, this);
currentImage = ++currentImage % totalImages;
try {
Thread.sleep(50);//单词打错
} catch (InterruptedException e) {
showStatus(e.toString());
}
repaint();
}
}
import java.awt.*;
public class ShowAnimator extends Applet {
Image[] m_Images;
int totalImages = 18;
int currentImage = 0;
public void init() {
m_Images = new Image[totalImages];
for (int i = 0; i < totalImages; i++)
m_Images[i] = getImage(getDocumentBase(), "images\\Img" + i//单词打错
+ ".gif");
}
public void start() {
currentImage = 0;
}
public void paint(Graphics g) {
g.drawImage(m_Images[currentImage], 50, 50, this);
currentImage = ++currentImage % totalImages;
try {
Thread.sleep(50);//单词打错
} catch (InterruptedException e) {
showStatus(e.toString());
}
repaint();
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询