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

Perform binary subtraction on following, Q Perform Binary Subtraction on fo...

Q Perform Binary Subtraction on following: 1) 1101-1000 2) 111.11-101.1 3) 1101.1-1010.01 Q Perform Binary Multiplication & Division on following: 1) 16*2.75 2) 1

What interprets can a browser contain besides html and http, What interpret...

What interprets can a browser contain besides HTML and HTTP? Besides an HTTP client and an HTML interpreter, a browser can have elements whihc enable the browser to perform any

What is hit and hit rate , What is hit? A successful access to data in ...

What is hit? A successful access to data in cache memory is known as hit. Normal 0 false false false EN-IN X-NONE X-NONE

What is XML DTD (Document Type Definition), What is XML DTD (Document Type ...

What is XML DTD (Document Type Definition)? DTD is a document which defines legal building blocks of a particular XML document. This defines the document structure along with

Explain XLAT instruction with help of example, Q. Explain XLAT instruction ...

Q. Explain XLAT instruction with help of example? Let's presume a table of hexadecimal characters signifying all 16 hexadecimal digits in table: HEXA      DB      '012345678

Write a program to read in a positive integer, Write a program to read in a...

Write a program to read in a positive integer and check whether it is prime or not? /* Program to check whether a given number is prime or not*/] # include # include

Write a pseudo code to find sum of two functions, Q. Write a pseudo code to...

Q. Write a pseudo code to find sum of two functions? Let's write a pseudo code to find sum of two functions f(A) + f(B). In first algorithm we will not use locking. Process

Value - elements of composition, Value Value is the relative amount of ...

Value Value is the relative amount of light and darkness in an image or a particular colour within an image. Value is also known as Tone and refers to the way the artist has re

Explain the fork-join, Explain the fork-join? fork-join: It is prim...

Explain the fork-join? fork-join: It is primitives in a programming language of higher level for implementing interacting processes. The syntax is as given below: fork

Explain passing parameters using pointers, Q. Explain Passing Parameters Us...

Q. Explain Passing Parameters Using Pointers ? This method overcomes the drawback of using variable names directly in procedure. It uses registers to pass procedure pointers to

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