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

What do you mean by u-area or u-block, What do you mean by u-area (user are...

What do you mean by u-area (user area) or u-block? This having the private data that is manipulated only by the Kernel. This is local to the Process, i.e. every process is a

Determine the object design of object oriented modelling, Determine the Obj...

Determine the Object Design of Object oriented modelling Object Design:   At this phase, a design model is created based on the analysis model which is already created in the

What is disadvantage of distributed systems, What is disadvantage of Dis...

What is disadvantage of Distributed systems? Ans. Reliability is disadvantage of Distributed system.

CRTscreen as a two-dimensional matrix, Explain the statement- CRT screen as...

Explain the statement- CRT screen as a two-dimensional matrix One can imagine the CRT screen as a two-dimensional matrix which has m rows and n  columns and this is usually ref

How do you traverse a btree in backward in-order, Put the node in the right...

Put the node in the right subtree Then, Put the root  Put the node in the left subtree

Determine the equivalent binary form of decimal number, Solve the equation ...

Solve the equation 23.6 10 = X 2 for X Ans. 23.6 10 = X 2 So as to find X, firstly convert the Decimal number 23.610 in its Binary form. After that take the decimal inte

Explain erasable programmable rom (eprom) - computer memory, Explain Erasab...

Explain Erasable Programmable ROM (EPROM) - Computer Memory? An EPROM is a ROM that can be reprogrammed and erased. A little glass window is installed at the top of the ROM pac

Why a function canot have delays, Why a function canot have delays? How...

Why a function canot have delays? However in Open Vera, delays are allowed in function. A function returns a value and hence can be used as a part of any expression. This doesn

Perform the subtraction using 1's complement, Perform the subtraction using...

Perform the subtraction using 1's complement of 11001 - 10110 Ans. 11001 - 10110 = X - Y                            X = 11001 1's complement of Y = 01001

Explain the following gray code, Q. Explain the following: a) Gray code ...

Q. Explain the following: a) Gray code b) Parity code c) Overflow Q. Give the counting up to 30 in Base 5. Q. Convert (175.6)8 into Gray code and Excess-3 code.

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