// Name of the file :: DrawJavA.java // created by :: Sridhar Kandukuri // Date :: 07/15/98 // Description :: Program introduces more graphic statements // The objective of this program is to // print the letters of the word 'JavA' using // different methods // To compile :: javac DrawJavA.java // To execute :: appletviewer DrawJavA.html import java.applet.Applet; import java.awt.*; public class DrawJavA extends Applet { public void paint (Graphics page) { setBackground(Color.white); // draw the character 'J' page.setColor(Color.magenta); page.fillRoundRect(20,20,60,10,10,10); page.drawLine(50,30,50,70); page.drawArc(20,60,30,20,180,180); // draw the character 'a' page.setColor(Color.blue); int[] xset1 = {100,100,140,140,100,100,140}; int[] yset1 = {30,20,20,80,80,50,50}; page.drawPolyline(xset1,yset1,7); // draw the character 'V' page.setColor(Color.orange); int[] xset2 = {160,190,220,210,190,170}; int[] yset2 = {20,80,20,20,70,20}; page.fillPolygon(xset2,yset2,6); // draw character 'A' int[] xset3 = {260,280,285,265}; int[] yset3 = {20,80,80,20}; page.setColor(Color.black); page.drawLine(260,20,240,80); page.fillPolygon(xset3,yset3,4); page.drawLine(250,50,270,50); } }// end class DrawJavA