• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to paint jpg using applet in browser!!

 
Raajesh Chandran
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!!
I want to place my pic in browser using applet.while in appletviewer I'm getting the pic.But in the browser it shows null.Expecting Help or sugesstion
Thankx in advance,
chandran


 
Daniel Searson
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you using to load the image? The best way to load images while in an applet is to use the Applet class's getImage() method like:
Image img = getImage(getCodeBase(), "filename.jpg");
Other methods for loading images, such as the createImage() method in Toolkit generally don't work in applets.
 
Raajesh Chandran
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!!
Thankx Dani.
Now I'm getting the image.I want to run the image(scrolling).I have 6pic I want to run the pic in the same appletwindow.I'm getting one after other.I want to scroll it.
Thankx
Regards,
chandran.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic