Can anyone tell me what is wrong with these codings?
import javax.microedition.lcdui.game.*;
public class Sprite extends Layer
{
public Sprite(Image image){}//end of constructor
protected void Paint(Graphics g){}//end of Paint
}//end of Sprite
And i am prompted with these errors;
C:\WTK21\apps\SProject\src\Sprite.java:12: cannot resolve symbol
symbol : class Image
location: class Sprite
public Sprite(Image image) {
^
C:\WTK21\apps\SProject\src\Sprite.java:18: cannot resolve symbol
symbol : class Graphics
location: class Sprite
protected void Paint(Graphics g){
^
C:\WTK21\apps\SProject\src\Sprite.java:5: Sprite should be declared abstract; it does not define paint(javax.microedition.lcdui.Graphics) in javax.microedition.lcdui.game.Layer
public class Sprite extends Layer
^
C:\WTK21\apps\SProject\src\Sprite.java:12: cannot resolve symbol
symbol : constructor Layer ()
location: class javax.microedition.lcdui.game.Layer
public Sprite(Image image) {
^
4 errors

Reply With Quote

