File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Images in applets

 
Ranu Kundu
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to include images in applets???
I have tried this:


Image image; public void init() {
image = getImage(getDocumentBase(), "http://hostname/image.gif");
}
public void paint(Graphics g) {
g.drawImage(image, 0, 0, this);
}

But nothing is showing in applet.Why?
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to be passing two URLs to the getImage() method.
Read the API doc to see what the second arg should be.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic