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

Smart card & e-cash, Smart Card & E-Cash E-cash storable smart cards ca...

Smart Card & E-Cash E-cash storable smart cards can kept and dispense cash electronically, making bills and coins lesser essential. It transfers funds over phone lines, making

What is single program multiple data, Q. What is Single Program Multiple Da...

Q. What is Single Program Multiple Data? A general style of writing data parallel programs for MIMD computers is SPMD (single program, multiple data) means all processors execu

Explain the paging unit, Explain the Paging Unit Paging mechanism funct...

Explain the Paging Unit Paging mechanism functions with 4K - byte memory pages or with a new extension available to Pentium with 4M byte-memory pages. In Pentium, with new 4M-b

Define constraints, Define Constraints Constraints can be defined as P...

Define Constraints Constraints can be defined as Preconditions (input values) and Post Conditions (output values). Preconditions on functions are constraints which input value

What is common language runtime, What is "Common Language Runtime" (CLR)?  ...

What is "Common Language Runtime" (CLR)?  CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code,

Pythagorean theorem, if the 6 is a and the b is 3 what is the c ?

if the 6 is a and the b is 3 what is the c ?

What controls the screen flow, What controls the screen flow? The SET ...

What controls the screen flow? The SET SCREEN and LEAVE SCREEN statements controls screen flow.

Explain fixed point representation, Q. Explain Fixed Point Representation? ...

Q. Explain Fixed Point Representation? The fixed-point numbers in binary has a sign bit. A positive number has a sign bit 0 whereas negative number has a sign bit 1. In fixed-p

Final year project, i want to make final year project in wireless.please he...

i want to make final year project in wireless.please help me to decide the topic???????

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