我的这个java程序为什么不显示图片,我的图片放在D盘
importjava.awt.*;importjava.applet.*;publicclassShowImageInAppletextendsApplet{Imagep...
import java.awt.*;
import java.applet.*;
public class ShowImageInApplet extends Applet{
Image picture;
public void init(){
picture=getImage(getCodeBase(),"456.jpg");
}
public void paint (Graphics g){
g.drawImage(picture,0,0,this)
;}} 展开
import java.applet.*;
public class ShowImageInApplet extends Applet{
Image picture;
public void init(){
picture=getImage(getCodeBase(),"456.jpg");
}
public void paint (Graphics g){
g.drawImage(picture,0,0,this)
;}} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询