Original Post
I created a class and a method called update to try and paint it. The update method is running(determined by println) but nothing is painting on the parent applet. parent is set in the constr as "this" in the applet. The images have loaded totally ive checked n double check that. thx in advance!
heres the code:
public void update()
{
if(parent == null)
{return;}
Graphics gg = parent.getGraphics();
Graphics2D g =(Graphics2D) gg;
int xx = x;
int yy = y;
card[] cards = new card[handSize()];
Image[] cardImages = new Image[handSize()];
int cardW = 0;
int cardH = 0;
for(int i = 0; i < handSize(); i++)
{
cards = getCard(i);
cardImages[i] = cards[i].getImage();
}
cardW = cardImages[0].getWidth(parent);
cardH = cardImages[0].getHeight(parent);
AffineTransform at = new AffineTransform();
for(int i = 0; i < cards.length; i++)
{
//at.setToTranslation((double)xx ,(double)yy);
//drawImage(cardImages[i], at, parent);
System.out.println("DRAWN");
xx += cardW + space;
}
}
DADDY LONG LEGZ HERE! novice java programmer :-)feel free to email me or my SN for AIM is JHHIM