Please tell me what is wrong

import java.awt.*;

import java.applet.*;

class CardImageextends Component{

private Image image;

publicvoid CardPicture(Image i){

setSize(71,96);

image = i;

}

publicvoid setPicture(Image i){

image = i;

}

publicvoid paint(Graphics g){

g.drawImage(image,0,0,this);

}

}

publicclass Pokerextends Applet{

publicvoid init(){

setLayout(new FlowLayout());

Image image = getImage(getCodeBase(),"AS.GIF");

CardImage card =new CardImage(image);

add(card);

}

}

what is wrong with this code?

it is supposet to display an picture of the Ace of Spades

i get the following error:

C:\Documents and Settings\Administrator\My Documents\GUI development\Poker\Poker.java:22: cannot resolve symbol

symbol : constructor CardImage (java.awt.Image)

location: class CardImage

CardImage card = new CardImage(image);

^

1 error

Tool completed with exit code 1

[2002 byte] By [apasechnik1a] at [2007-9-28 11:52:31]
# 1

class CardImage extends Component <- CardImage here

{

private Image image;

public void CardPicture(Image i) <- CardPicture there...

...

should be:

public CardImage(Image i)

since a constructor doesnt return anything... maybe it would be a good idea to get a book... without some basic knowledge u r lost.

(btw there are some html java books around... try google and maybe "thinking in java"... thats one of the online books i can remember)

oNyxa at 2007-7-12 2:44:14 > top of Java-index,Other Topics,Java Game Development...
# 2
shows how good my school class is hehe(!)
apasechnik1a at 2007-7-12 2:44:14 > top of Java-index,Other Topics,Java Game Development...