import java.applet.Applet; import java.awt.*; public class Esim3 extends Applet { public void init() { Color tausta = new Color(200,200,200); setBackground(tausta); } public void paint (Graphics x) { Color edusta = new Color(0,0,0); x.setColor(edusta); x.drawLine(10,10,100,150); x.drawRect(50,50,100,100); x.drawRoundRect(20,40,120,120,20,20); x.draw3DRect(100,100,80,60,true); x.drawArc(150,150,40,40,0,120); x.drawOval(5,5,200,200); x.drawOval(5,5,100,200); Polygon p = new Polygon(); p.addPoint(30,30);p.addPoint(100,130);p.addPoint(210,170); x.drawPolygon(p); } }