How to get Applet’s document URL?

Below java code show how to get Applet’s document URL –

 * Created on Nov, 2004 Copyright(c) All Rights Reserved.

import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;

 * @author
public class AppletGetDocumentBase extends Applet {

	Image image;

	public void init() {
		image = getImage(getDocumentBase(),"logo.png");

	public void paint(Graphics g) {
		g.drawImage(image, 0, 0, this);


Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.