Displays a message when an applet starts up, Computer Engineering

Assignment Help:

Write an applet that sets the background colour to cyan and foreground colour to red and displays a message that illustrates the order in which various applet methods are called when an applet starts up. For example:

inside ini t ()...inside start( )...

import java.awt . *

import java.applet . * //import package

public class Method_order Extends Applet  //declaration of class

{

String msg;

/ /Sets the background and also foreground color.public void init( )

{

setBackground(Color .cyan);

setForeground(Color .red);

msg =" inside init 0- -";

}

/ / string is initialize to be displayed.

public void init( )

{

msg =" inside startO- - ";

}

lSets the background and foreground color.

public void paint (Graphics g)

{

msg =" inside paint () -";

g.drawst ring(msg, 10 , 30);

}

}


Related Discussions:- Displays a message when an applet starts up

Explain the main characteristics of semiconductor memory, Explain the Main ...

Explain the Main characteristics of semiconductor memory Memory, with regard to computers, most commonly signifies to semiconductor devices whose contents can be accessed (whic

State the tips of timescale directive, State the Tips of timescale directiv...

State the Tips of timescale directive Include a `timescale directive at the top of each module, even if there are no delays i n the module, since some simulators may require th

Representations or languages - artificial intelligence, Representations/Lan...

Representations/Languages Used: Many people are taught "AI" with the opening line: "The three most important things in "AI" are  representation, representation and representat

What are the uses of interactive reporting, What are the uses of interactiv...

What are the uses of interactive reporting? The user can actively control data retrieval and show during the session.  Instead of an extensive and detailed list, you make a ba

What is read-only-memory, Q. What is Read-only-Memory? Read only memory...

Q. What is Read-only-Memory? Read only memory is an illustration of a Programmable Logic Device (PLD) it implies that binary information which is stored within a PLD is specifi

Concept of pipelining, Describe the concept of pipelining. Ans: Pipeli...

Describe the concept of pipelining. Ans: Pipelining is the means of executing machine instructions concurrently. This is the effective way of organizing concurrent activity in

Describe the structure of a neuron - artificial intelligence, 1. Figure 1 b...

1. Figure 1 below shows the truth table for five different functions. Each truth table shows the inputs x1, x2 and the desired output d. (a) Write down which of these functions

Ecommerce concepts, Your task is to propose a business that has a Web ...

Your task is to propose a business that has a Web presence on the Internet. Your business may be an online only business or a so-called "clicks and mortar" business. You

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