import java.awt.*; import java.awt.geom.*; public class Kujund5 extends Canvas{ public void paint(Graphics alggr){ Graphics2D g=(Graphics2D)alggr; GeneralPath gp=new GeneralPath(); gp.append(new Ellipse2D.Float(20, 50, 40, 40), false); gp.append(new Line2D.Float(40, 100, 40, 150), false); g.draw(gp); } public static void main(String argumendid[]){ Frame f=new Frame(); f.add(new Kujund5()); f.setSize(300, 200); f.setVisible(true); } }