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

Displacement addressing mode - computer architecture, Displacement and  Sta...

Displacement and  Stack Addressing  mode - computer architecture: Displacement Addressing: In displacement addressing mode there are three types of addressing mode. They

What are program-invisible registers, What are program-invisible registers?...

What are program-invisible registers? Ans: the local and global descriptor tables are found in the memory system. To access and specify the address of these tables, program inv

C, "Super ASCII", if it contains the character frequency equal to their asc...

"Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the ascii values will starts from

Single bus structures, Single BUS STRUCTURES : The Bus structure and ...

Single BUS STRUCTURES : The Bus structure and multiple bus structures are kinds of bus or computing. A bus is fundamentally a subsystem which transfers data amongst the compo

Serialized when you perform serialization, What exactly is being serialized...

What exactly is being serialized when you perform serialization? Serialization is the process of changing an object into stream of bytes. We perform it at the time of transpor

C token, describe briefly about the c token with suitable example program

describe briefly about the c token with suitable example program

Convert the given S-R flipflop to a D-flip flop., Convert the given S-R fli...

Convert the given S-R flipflop to a D-flip flop. Ans: The Truth Table for S-R Flip-Flop is illustrated in Fig.(a) and truth table of D Flip-Flop is illustrated in Fig.(b)

Difference b/w non-relocatable and relocatable programs, Differentiate bet...

Differentiate between non-relocatable and relocatable programs. A non-relocatable program is one which cannot be executed in any memory area other than the area starting at i

C++, A palindrome is a string that reads the same from both the ends. Given...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Properties of e-cash, Properties: 1.  Monetary Value: Monetary value mu...

Properties: 1.  Monetary Value: Monetary value must be backed by either cash, bank - authorized credit cards or bank certified cashier's cheque. 2.  Interoperability: E-cash

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