[求助]Applet图片应用问题
import java.applet.Applet;import javax.swing.*;
import java.net.*;
import java.awt.Dimension;
public class AppletImageDemo extends Applet {
public void Init(){
try {
jbInit();
}catch (Exception e){
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setSize(new Dimension(159, 130));
this.repaint();
}
public void paint(Graphics g){
String fileName="bunengshuodemimi.JPEG";
URL codeBase =null;
URL url =null;
try{
codeBsae=this.getCodeBase();
url =new URL(codeBase,fileName);
javax.swing.ImageIcon icon=new javax.swing.ImageIcon(url);
g.drawImage(icon.getImage(),10,10,400,300,null);
}
catch(Exception e){
}
}
}
有2个错误找半天也没改出来,帮忙修改下