import java.awt.*;
import java.applet.Applet;import javax.swing.*;public class yuan extends Japplet
{ImageIcon img;
public void init()
{img=new ImageIcon("1.png");
}
public void paint(Graphics g)
{img.paintIcon(this,g,0,0);
g.drawImage(img.getImage(),0,40,getWidth(),getHeight() -50,this);
}
}
为什么这样运行有误,而把Japplet改为Applet就行
import java.applet.Applet;import javax.swing.*;public class yuan extends Japplet
{ImageIcon img;
public void init()
{img=new ImageIcon("1.png");
}
public void paint(Graphics g)
{img.paintIcon(this,g,0,0);
g.drawImage(img.getImage(),0,40,getWidth(),getHeight() -50,this);
}
}
为什么这样运行有误,而把Japplet改为Applet就行
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货