import java.awt.*; import java.awt.geom.*; public class Kujund3 extends Canvas{ public void paint(Graphics alggr){ Graphics2D g=(Graphics2D)alggr; BasicStroke b1=new BasicStroke(15, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL); Shape kujund=b1.createStrokedShape( new Ellipse2D.Float(100, 100, 50, 70) ); g.fill(kujund); g.setColor(Color.green); g.draw(kujund); } public static void main(String argumendid[]){ Frame f=new Frame("Pliiatsijoonis"); f.add(new Kujund3()); f.setSize(300, 200); f.setVisible(true); } }