This week's book giveaway is in the Security forum.
We're giving away four copies of Penetration Testing Basics and have Ric Messier on-line!
See this thread for details.
Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

raymond yadao
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 );
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

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic