Original Post
Okay, I''ve pieced this code together, just barely, but it doesn''t work right. It compiles, just doesn''t work.
Why won''t it work?
AOL, so easy to use, no wonder it''s nothing but a bunch of retards
Spyder''s Web Games
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.applet.*;
public class App2 extends Applet implements MouseListener
{
int x=0,y=0;
Image img;
public void init()
{
addMouseListener(this);
img=getImage(getCodeBase(),"knight.gif");
}
public void destroy()
{
removeMouseListener(this);
}
public void paint(Graphics g)
{
g.drawImage(img,x,y,this);
}
public void mouseReleased(MouseEvent e)
{
x=e.getX();
y=e.getY();
repaint();
}
}
|
Spyder''s Web Games