Write an applet that display the directory holding html file, Computer Engineering

Assignment Help:

Write an applet that display the directory holding the HTML file that started the applet and the directory from which, applet class file was loaded.

An applet is here given below, which display the directory holding the HTML file which started the applet:

import java.awt .*;

import java.applet .*;    //import package

import java.net .*;

public class Base extends Applet

{

public void piant (Graphics g)

{

String msg;

URL url = getCodebase( );  / / string is initialize to be displayed.

Msg = "Code base:" +url . tost ring( );

g.drawst ring(msg,10,20);

URL url = getDocumentbase() ;

Msg = "Document base: " +url . tost ring();

g.drawst ring(msg,10,40);

}

}


Related Discussions:- Write an applet that display the directory holding html file

Explain proces of defining the document page title, Q. Explain proces of de...

Q. Explain proces of defining the Document Page Title? Though the document has a file name, notice it's still labelled Untitled Document; that is because it needs an HTML docum

Where time synchronization is necessary, Time synchronization is necessary ...

Time synchronization is necessary in? Time synchronization is essential in TDM.

Calculations for a standard vga graphics screen, Q. Calculations for a stan...

Q. Calculations for a standard VGA graphics screen? Let's do the calculations for a standard VGA graphics screen (640×480) using 16 colours. Total number of Pixels = 640 ×48

What is asynchronous dram, What is asynchronous DRAM? In asynchronous D...

What is asynchronous DRAM? In asynchronous DRAM, the timing of the memory device is controlled asynchronously. A specialized memory controller circuit gives the essential contr

What is domain analysis, What is domain analysis? Domain analysis is c...

What is domain analysis? Domain analysis is concerned with devising a precise, concise, understandable and correct model of the real world. Analysis starts with problem statem

What is user defined functions, What is User Defined Functions? User-De...

What is User Defined Functions? User-Defined Functions permit defining its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a t

Intuitively simple - user friendliness, Intuitively Simple - User Friendlin...

Intuitively Simple - User Friendliness This is the degree to which the system operates in congruence with human operation, in effect the machine does what we naturally think i

Software engineering, how many errors will be left after defect amplificat...

how many errors will be left after defect amplification and removal method on the following data design=40 analysis=30 maintenance=20 testing 35 coding 25 take 75% removal efficie

What is "at exit-command", What is "at exit-command:? The flow logic K...

What is "at exit-command:? The flow logic Keyword at EXIT-COMMAND is a special addition to the MODULE statement in the Flow Logic .AT EXIT-COMMAND lets you call a module befor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd