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. CORBA based application for addition of two mathematical expressions of the form (ax + by) and displaying the result on client side

  2. Program that maintains employee database of an education system

  3. Socket program of multi client chat server

  4. Program to convert the given temperature in faherenhiet to celsius using the following conversion formula C= F- 32/1.8

  5. RMI based application, which reads a file with list of marks of student from a client, send it to server and find how many students having distinct

  6. Program of concatenating and Buffering files

  7. CORBA program for displaying the date and time of the server machine, client machine and the difference between these two date and time

  8. An applet program to find maximum of three numbers using textField

  9. Program to show an example of creating Character Arrays from String objects

  10. Program to append a StringBuffer by StringBuffer, String objects and other Basic Data Types

  11. Program to show the use of Bitwise Operator (~) Complement

  12. Program to show the use of While Loop

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

  14. Program to show the comparing of Strings for equality

  15. Program that takes a long sentence and a character from the client and count the occurrence of the character in the sentence at the server side

  16. Program to display reverse $ tree

  17. Program to show an example of getting at characters in a String

  18. Program to show an example of using a Static Nested Class

  19. RMI based application for login validation based on data saved in text file stored on the server and will display appropriate message to the client..

  20. Program to show the use of Increment and Decrement Operators

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