Java Tutorial

 
 
 
 
/* <applet code=\"URLDemo\"   height=100 width=400> </applet> */

import java.awt.*;
import java.applet.*;
import java.net.*;

public class URLDemo extends Applet
{
      public void paint(Graphics g){
          String msg;

          URL url=getCodeBase();
          msg = \"Code Base : \"+url.toString();
          g.drawString(msg,10,20);

          url=getDocumentBase();
          msg=\"Document Base : \"+url.toString();
          g.drawString(msg,10,40);
    }
}

    Related Post:
  1. Program to display bank account

  2. Program to show the use of some Character Methods

  3. Program to show an example of using multiple classes in a program

  4. Program to declare and initialize Boolean variables and print them on the Standard Output Device

  5. Create an interface coversions. Which have the following functions Inchestomillimeters(), hptowatts(),wattstohp(),poundstogram(),gramtopounds()

  6. Program to determine the sum of the following harmonic series for a given value of n

  7. Program using Switch case to compute the net amount to be paid by a customer

  8. Program to show an example of Copying i.e. Clonning Objects

  9. Write a class whose objects holds a current value and have a method to add that value, printing the new value

  10. Program to evaluate following investment equation V=P(1+R)^N

  11. GUI application in java, which enter the details of a student and on the submit display the details of the student

  12. Program to show the use of Bitwise Operator (&) AND

  13. An applet program to display barchart of given data

  14. Program to show the use of operator (&lt;&lt;) Shift Left filling with zero from the right

  15. Program to show some properties of StringBuffer object

  16. Program to display Floyds Triangle of a numbers

  17. Word list program that reads a text file and makes an alphabetical list of all the words in that file. The list of words is output to another file

  18. Program to extract a portion of a character string and print the extracted string

  19. An applet program to display Horizontal Color Bar

  20. Corba program of game

 
 
Didn't find what you were looking for? Find more on An applet program to give demo of getDocumentBase() and getCodeBase() methods