just a tiny square comes up where the top left of teh .gif should
be
can someone please tell me what the corresponding .html
of the following code should look like?
I think thts whare the problem is
________________________________________________________________
import java.awt.*;
import java.applet.*;
import java.net.*;
public class TrivialApplet extends Applet
{
Image snake;
public void init()
{
URL codeBase = getCodeBase();
snake = getImage(codeBase, "snake.gif"
resize(250, 250);
}
public void paint(Graphics g)
{
int width = snake.getWidth(this);
int height = snake.getHeight(this);
g.drawRect(52, 52, width+10, height+10);
g.drawImage(snake, 57, 57, width, height, this);
}
}
Lupine
RobertCorrina@patownsend.com
be
can someone please tell me what the corresponding .html
of the following code should look like?
I think thts whare the problem is
________________________________________________________________
import java.awt.*;
import java.applet.*;
import java.net.*;
public class TrivialApplet extends Applet
{
Image snake;
public void init()
{
URL codeBase = getCodeBase();
snake = getImage(codeBase, "snake.gif"
resize(250, 250);
}
public void paint(Graphics g)
{
int width = snake.getWidth(this);
int height = snake.getHeight(this);
g.drawRect(52, 52, width+10, height+10);
g.drawImage(snake, 57, 57, width, height, this);
}
}
Lupine
RobertCorrina@patownsend.com