public class a extends Applet {
public void init() {
Image i = this.createImage(this.getsize().width, this.getsize().height) ;
Graphics g = i.getGraphics() ;
}
}
老是说i是NullPoint
为什么
...全文
945打赏收藏
为什么会有NullPointExption
有这样的程序: public class a extends Applet { public void init() { Image i = this.createImage(this.getsize().width, this.getsize().height) ; Graphics g = i.getGraphics() ; } } 老是说i是NullPoint 为什么
public class a extends Applet {
public void paint(Graphics g) {
Image i = this.createImage(this.getsize().width, this.getsize().height) ;
Graphics g = i.getGraphics() ;
}
}