Example 12.2 : Program to demonstrate the use of setColor() function.import java.applet.*;
import java.awt.*;
public class lines extends Applet {
public void paint (Graphics g)
{
g.drawLine(10, 20, 170, 40);
g.setColor(Color.red);
g.drawLine(170, 40, 80, 140);
g.setColor(Color.yellow);
g.drawLine(80, 140, 10, 20);
}
}
About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement 
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 

To demonstrate the use of set color ( ) function.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 Draw lines diagonally across the applet
2 To demonstrate the use of set color ( ) function.
3 To demonstrate the use of draw Rect ( ) function.
4 To demonstrate the use of clear Rect function.
5 To demonstrate the use of fill Rect function.
6 To demonstrate the use of draw polygon ( ) and fill polygon function.
7 To demonstrate the use of draw polygon ( ) function.
8 To demonstrate the use of draw arc ( ) function.
9 To demonstrate the use of fill arc ( ) function.
10 To demonstrate the use of get Image ( ) function.
11 Program to demonstrate the use of draw Oval related to rectangle.
12 To demonstrate the use of draw oval and fill oval function.
13 To demonstrate the draw and fill arc functions.
14 To demonstrate the draw arc and fill arc functions.
15 To demonstrate the use of different graphical functions.

 

     
About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement