×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    9

    Take a look at this, please;

    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

  2. #2
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    79
    You should to import package javax.microedition.lcdui.*

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •