permaculture playing cards*
The moose likes Applets and the fly likes applet LoadAGif can't start: error???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "applet LoadAGif can Watch "applet LoadAGif can New topic
Author

applet LoadAGif can't start: error????

raymond yadao
Ranch Hand

Joined: Jan 29, 2001
Posts: 88
i've tried the code in displaying picture(gif) from the javaranch code barn. It's working well in appletviewer and ie5 but when i run in netscape an error message appear (applet LoadAGif can't start: error). why is this so? thus netscape doesn't support java?

here's the code:
import java.applet.* ;
import java.awt.* ;

public class LoadAGif extends Applet
{
private Image myImage ;
public void init()
{
myImage = getImage( getCodeBase() , "superduke.gif" );
// use a MediaTracker so the image will be downloaded
// completely before being displayed
MediaTracker mt = new MediaTracker( this );
mt.addImage( myImage , 0 );
try
{
mt.waitForAll(); // blocks here until Image is fully downloaded
}
catch ( InterruptedException e )
{
}
}// close init
public void paint( Graphics g )
{
g.drawImage( myImage , 25 , 25 , this );
}// close paint
}// close applet

raymond
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: applet LoadAGif can't start: error????