Write an applet,interact with http client & html interpreter, Computer Engineering

Assignment Help:

Write an applet that can interact with both the HTTP client and HTML interpreter in a browser. 

import java.applet.*;

import java.net.*;                        // import packages //

import java.awt.*;

public class buttons extends Applet {

public void init ( ) {

add(new Button{"Yin"});

add(new Button{"Yang"});

}

public Boolean action(Event e, Object arg) {

if (( ( Button) e. target).getLabel( ) == "Yin") {

try {

getAppletContext( ).showDocument(new

URL(http: / /www.expertsminds.com/yin();

}

catch(Exception ex) {

/ / catch block is used for Handle the exception handling / /

}

}

else if (( (Button) e. target) .getLabel ( ) == "Yang") {

try {

getAppletContext ( ).showDocument(new

URL(http: / /www.expertsminds.com/yang( );

}

catch(Exception ex) {

/ / try block is used for Handle the exception handling / /

}

}

return true;

}

}


Related Discussions:- Write an applet,interact with http client & html interpreter

Which things should microprocessor validate, Q. Which things should micropr...

Q. Which things should microprocessor validate? A microprocessor should validate: Powerful addressing modes More addressing capability More throughput Po

Control hazard and delayed branching, Described Instruction or control haza...

Described Instruction or control hazard? Ans: The pipeline can be stalled due to delay in the availability of an instruction. For instance, this may be a result of a miss in t

Define realization of one flip flop using other flip flops, Define Realizat...

Define Realization of one flip flop using other flip flops? It is probable to implement a flip flop circuit using any other circuit. Universal block diagram is shown below.

Why does ftp use two standard ports, Why does FTP use two standard ports wh...

Why does FTP use two standard ports whereas other protocols, in general use only one port? Justify. File transfer protocol uses a control connection just to send commands and r

Low level language program, The commands (instructions) are native instruct...

The commands (instructions) are native instructions to the 68HC11 and therefore it is termed a low level language program. Examining the program the instructions (mnemonics) they a

Including the titles, Your company is planning a party for employees, and y...

Your company is planning a party for employees, and you have been asked to set up a spreadsheet to track the attendees and to measure the associated cost. Every employee is permitt

State some criterias and their effects on a database, It is possible to ent...

It is possible to enter one or more criteria in the rows which can influence your database significantly. >="Callahan" this returns all the several records from Callahan to the

Components of a 3-tier client server, What are the essential components of ...

What are the essential components of a 3-tier client server In a three-tier or multi-tier environment, the client executes the presentation logic (the client). The business log

Explain what are the different hazards, There are situations, called hazard...

There are situations, called hazards that stop the next instruction in the instruction stream from implementing during its designated clock cycle. Hazards decrease the performance

Feasebility study, what are the feasibility study of online result manageme...

what are the feasibility study of online result management system?

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