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

Microprocesser, explain the bock and pin diagram of 8259 micropocesser

explain the bock and pin diagram of 8259 micropocesser

Find the maximum and minimum number-binary, What is the maximum and minimum...

What is the maximum and minimum number in the range of a 7-digit number for each of the following cases? Express all numerical answers in both the original base and its decimal (ba

What is interaction modeling, What is interaction modeling? Interaction...

What is interaction modeling? Interaction model explains interactions within a system. The interaction model explains how objects interact to produce useful results. It is a ho

Example on cyclic distribution of data, Q. Example on Cyclic Distribution o...

Q. Example on Cyclic Distribution of data? !HPF$ PROCESSORS P1(4) !HPF$ TEMPLATE T1(18) !HPF$ DISTRIBUTE T1(CYCLIC) ONTO P1 The result of these instructions is display

the bias and standard error , A random variable (X) is modelled as an expo...

A random variable (X) is modelled as an exponentially distributed with mean 30 units. Simulate N = 50 samples from this distribution, and every sample must have m = 20 simulated va

What is interrupt vector table, Interrupt vector table is always created in...

Interrupt vector table is always created in first 1K area of the memory. Explain why? When CPU receives an interrupt type number from PIC, it uses this number to look up corres

Wireless Networking, Suppose you work in a network security company, and yo...

Suppose you work in a network security company, and you need to prepare a survey report of a particular security issue of wireless networking. To start with, select an area of wire

Advantage of doubly linked list over singly linked list, What is the advant...

What is the advantage of doubly linked list over singly linked list?       Ans: Benefits of the doubly linked list over singly linked list 1. A doubly linked list can be pas

Explain grade of service with reference to telephone traffic, With referenc...

With reference to telephone traffic, explain the terms GOS. GOS: in loss systems, the traffic carried through the network is usually lower than the actual traffic offered to

Describe the roles of association, Describe the roles of association No...

Describe the roles of association Note that each association has roles. For instance, in Figure we can see that two classes, Student and University, have their predefined roles

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