import java.applet.Applet; import java.awt.*; public class Esim4 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.fillRect(10,10,30,30); x.fill3DRect(40,40,80,60,true); x.fillArc(100,110,160,150,0,120); Polygon p = new Polygon(); p.addPoint(220,220);p.addPoint(270,280);p.addPoint(210,170); x.fillPolygon(p); } }