Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  LineGraph.java
Language: JAVA
Code:
import java.awt.*;
import java.applet.*;

public class LineGraph extends Applet
{
  
 
 public void paint(Graphics g)
 {
  int x[]={0,60,120,180,240,300,360,400};
   int y[]={400,280,220,140,60,60,100,220};
   
  int num=x.length;
  g.setColor(Color.red);
 g.drawPolygon(x,y,num);
 }
 }
 
 /*   <HTML>
       <BODY>
       <APPLET code=LineGraph.class
                width=600
                height=600
                >
                </APPLET>
                </BODY>
                </HTML>
                
                */
                
                

 
 
 
 
Comments: