import java.awt.*; import java.awt.image.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class Pentagon extends Canvas implements ComponentListener{ private BufferedImage bi = null; private Graphics g = null; private int sek = 5; private int kordusi = 10; private double nihe = 0.2; private double jaak = 1 - nihe; private Color foreground = Color.white; private Color background = Color.black; Pentagon(){ super(); addComponentListener(this); } public void paint(Graphics g){ if(bi != null){ g.drawImage(bi, 0, 0, this); } } public void update(Graphics g){ paint(g); } public void updateBufImage(){ int[] x = new int[sek]; int[] y = new int[sek]; int[] ax = new int[sek]; int[] ay = new int[sek]; double kraad = 2*Math.PI/sek; double z = 0; double a = getSize().width/2; double b = getSize().height/2; double r = Math.min(a, b) - 10; for(int c = 0; c