//Problem to illustrate the use of set Background and Set foreground functions.
//Solution :
import java.awt.*;
import java.applet.*;
/*
<applet code=”applet2" height=200 width=300>
</applet>
*/
class applet2 extends Applet{
String meg;
public void init()
{
setBackground(Color.green);
setForeground(Color.red);
meg="Method inside init";
}
public void start()
{
meg+=" Method inside start";
}
public void stop()
{

}
public void paint(Graphics g)
{
g.drawString(meg,50,50);
}
}

Home      |      About Us      |     Portfolio      |      Services      |      Courses      |     Career      |      Cost      |      Contact Us
Services
  SEO   
  Link Building
  Data Entry
  Web Design and development
  Web Application development
 

Graphic and multimedia

  E-Commerce Solutions
  Software development
  Web Marketing & Promoting
  Internet Marketing
  IT Outsourcing
  Multimedia/CD Presentation
  Synopsis Ideas
  Project Ideas
  Placement Papers
  Live Project Training
  Programming & Projects
  Faq
  Training @balujalabs
 
 
Method
 

To illustrate the use of set background and set foreground Functions

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 To Illustrate the Lifecycle of the Applet
2

To Illustrate the use of paramtay

3 To Illustrate the use of Param Tag
4 To illustrate the use of set background and set foreground Functions
5

To illustrate the use of set background and set foreground Functions