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

Is it possible to pass data and include program explicitly, Is it possible ...

Is it possible to pass data to and from include programs explicitly? No.  If it is needed to pass data to and from modules it is needed to use subroutines or function modules.

What is telex, Telex is a (A)  Telephone Service between various subsc...

Telex is a (A)  Telephone Service between various subscribers (B)  Tele printer Service between various subscribers (C)  Television Service between various subscri

Explain about interrupt-processing sequence, Q. Explain about Interrupt-Pro...

Q. Explain about Interrupt-Processing Sequence? The occurrence of an interrupt fires a numbers of events both in processor hardware and software. Figure below displays a sequen

Describe the concepts of information systems delivery cycle, Write a 2-3 pa...

Write a 2-3 page paper (excluding title, abstract, introduction, and references) describing the concepts of the Information Systems Delivery Cycle (SDLC) and how the Project Manage

Flynn’s classification, Flynn's Classification Flynn's classification i...

Flynn's Classification Flynn's classification is based on multiplicity of data streams and instruction streams observed by the CPU during program execution. Let Ds and Is  are

Information distribution, INFORMATION DISTRIBUTION: The organization and m...

INFORMATION DISTRIBUTION: The organization and management of any institution, be it an isolated lab or a large site with many labs, requires that information is managed. Methods o

C programming, At a shop of marbles, packs of marbles are prepared. Packets...

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

GRID COMPUTING, I NEED THE CODES IN MATLAB FOR RESOURCE ALLOCATION IN GRID ...

I NEED THE CODES IN MATLAB FOR RESOURCE ALLOCATION IN GRID COMPUTING

Enumerate about the trackball device, Enumerate about the trackball A t...

Enumerate about the trackball A trackball is a two-dimensional positioning device, a spaceball provides six degrees of freedom. Unlike the trackball, a spaceball does not actua

Parallel edge or self loop of the total number of edges, A graph with n ver...

A graph with n vertices will definitely have a parallel edge or self loop of the total number of edges are More than n(n-1)/2

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