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 the term- wire and register, What is the difference between wire an...

What is the difference between wire and reg? Net types: (wire,tri)Physical connection between structural elements. Value assigned by a continuous assignment or a gate output.

Vector-memory instructions-vector processing, Vector-Memory Instructions : ...

Vector-Memory Instructions : When vector operations with memory M are executed then these are vector-memory instructions. These instructions are denoted with the many function mapp

Bus arbitration - computer architecture, Bus arbitration: In single bu...

Bus arbitration: In single bus architecture when more than 1 device requests the bus, a controller known as bus arbiter decides who gets the bus; this is known as the bus arbi

Explain the drawback of top down parsing of backtracking, Write down the dr...

Write down the drawback of top down parsing of backtracking. Following are disadvantages of top down parsing of backtracking: (i) Semantic actions can't be performed whereas

Explain logical shifts with example, Q. Explain Logical shifts with example...

Q. Explain Logical shifts with example? Logical shifts LOGICAL SHIFT LEFT and LOGICAL SHIFT RIGHT insert zeros to end bit position and other bits of a word are shifted left or

Inheritance, Create a new project, LastNameFirst 05, for this assignment. ...

Create a new project, LastNameFirst 05, for this assignment. You will need to define the classes depicted in the class diagram below. All of the classes should contain complete ja

Explain working of supercomputer, Q. Explain working of Supercomputer? ...

Q. Explain working of Supercomputer? Supercomputers, capable of executing in excess of one billion floating-point operations per second (FLOPS), are very powerful, extremely hi

State about the logic micro-operations, State about the Logic Micro-operati...

State about the Logic Micro-operations These operations are performed on binary data stored in register. For a logic micro-operation each bit of a register is treated as a diff

Mathematical simulation and modeling applications, Mathematical Simulation ...

Mathematical Simulation and Modeling Applications The tasks including modeling and mathematical simulation require a lot of parallel processing. Three basic formalisms in model

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