0

Hai, I'm trying to load an image using applet.but i didn't get the image.
The applet screen was an empty,it shows at the status bar "Start: Applet not initialized" .
I don't know how to get a image.pls somebody help me.the codes following


------------------------------------------------------------------------------------

/*<applet code="crim1.class" height=500 width=500>
<param name="img" value="Sunset.jpg"></applet>*/

import java.awt.*;
import java.applet.*;


class crim1 extends Applet
{
Image img;
public void init()
{
img=getImage(getDocumentBase(), getParameter("img"));
}
public void paint(Graphics g)
{
g.drawImage(img,0,0,this);

}
}

--------------------------------------------------------------------------------------

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by BestJewSinceJC
0

Hai, I'm trying to load an image using applet.but i didn't get the image.
The applet screen was an empty,it shows at the status bar "Start: Applet not initialized" .
I don't know how to get a image.pls somebody help me.the codes following


------------------------------------------------------------------------------------

/*<applet code="crim1.class" height=500 width=500>
<param name="img" value="Sunset.jpg"></applet>*/

import java.awt.*;
import java.applet.*;


class crim1 extends Applet
{
Image img;
public void init()
{
img=getImage(getDocumentBase(), getParameter("img"));
}
public void paint(Graphics g)
{
g.drawImage(img,0,0,this);

}
}

-----------------------------------------------------------------------------------

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.