R
RANG
Hi,
Am new to java.
In front page of my project, i'm trying to load an logo using the code
below. but it didnt show the img in applet. Pls. tell me whats wrong
in this
import java.awt.*;
import java.applet.*;
/*<applet CODE="image.class" width=500 height=200></applet>*/
public class image extends applet
{
public void init()
{
Image img;
img=getImage(getCodeBase(),"rabbit.gif");
}
public void paint(Graphics g)
{
g.drawImage(img,10,10,this);
}
}
Thanks
Am new to java.
In front page of my project, i'm trying to load an logo using the code
below. but it didnt show the img in applet. Pls. tell me whats wrong
in this
import java.awt.*;
import java.applet.*;
/*<applet CODE="image.class" width=500 height=200></applet>*/
public class image extends applet
{
public void init()
{
Image img;
img=getImage(getCodeBase(),"rabbit.gif");
}
public void paint(Graphics g)
{
g.drawImage(img,10,10,this);
}
}
Thanks